Skip to content

Commit 7082d33

Browse files
committed
fix scripts
1 parent 16cdf77 commit 7082d33

File tree

8 files changed

+29
-23
lines changed

8 files changed

+29
-23
lines changed

measure/android/app/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ android {
66
compileSdkVersion 27
77
buildToolsVersion "27.0.3"
88

9-
packagingOptions {
10-
11-
}
12-
139
defaultConfig {
1410
applicationId "com.javascriptcore.profiler"
1511
minSdkVersion 21
1612
targetSdkVersion 27
1713
versionCode 1
1814
versionName "1.0"
15+
ndk {
16+
abiFilters "armeabi-v7a", "x86"
17+
}
1918
}
2019
signingConfigs {
2120
release {

measure/scripts/measure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const _ = require('lodash');
22
const exec = require('shell-utils').exec;
33

4-
const TIMES = 4;
4+
const TIMES = 10;
55

66
const PACKAGE_NAME = 'com.javascriptcore.profiler';
77
const ACTIVITY_NAME = 'MainActivity';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@
2929
"webkitGTK": "2.19.2",
3030
"chromiumICUCommit": "b34251f8b762f8e2112a89c587855ca4297fed96"
3131
}
32-
}
32+
}

scripts/compile/all.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ compile_arch() {
2020
}
2121

2222
compile() {
23-
# for arch in arm x86
24-
# do
25-
# export JSC_ARCH=$arch
26-
# export ENABLE_COMPAT=1
27-
# compile_arch
28-
# done
23+
for arch in arm x86
24+
do
25+
export JSC_ARCH=$arch
26+
export ENABLE_COMPAT=1
27+
compile_arch
28+
done
2929

30-
for arch in arm64 #x86_64
30+
for arch in arm64 x86_64
3131
do
3232
export JSC_ARCH=$arch
3333
export ENABLE_COMPAT=0

scripts/compile/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ COMMON_CFLAGS=" \
137137
-DPIC \
138138
-fPIC \
139139
-fvisibility=hidden \
140+
-DNDEBUG \
140141
$SWITCH_COMMON_CFLAGS_INTL \
141142
"
142143

scripts/compile/jsc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $JSC_LDFLAGS \
2727
$PLATFORM_LDFLAGS \
2828
"
2929

30-
CC="$TOOLCHAIN_DIR/bin/aarch64-linux-android-gcc" $TARGETDIR/webkit/Tools/Scripts/build-webkit \
30+
$TARGETDIR/webkit/Tools/Scripts/build-webkit \
3131
--jsc-only \
3232
--release \
3333
--jit \
@@ -39,7 +39,7 @@ CC="$TOOLCHAIN_DIR/bin/aarch64-linux-android-gcc" $TARGETDIR/webkit/Tools/Script
3939
--cmakeargs="-DCMAKE_SYSTEM_NAME=Android \
4040
$SWITCH_BUILD_WEBKIT_CMAKE_ARGS_COMPAT \
4141
-DCMAKE_SYSTEM_VERSION=$ANDROID_API \
42-
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
42+
-DCMAKE_SYSTEM_PROCESSOR=$ARCH \
4343
-DCMAKE_ANDROID_STANDALONE_TOOLCHAIN=$TOOLCHAIN_DIR \
4444
-DWEBKIT_LIBRARIES_INCLUDE_DIR=$TARGETDIR/icu/source/common \
4545
-DWEBKIT_LIBRARIES_LINK_DIR=$TARGETDIR/icu/${CROSS_COMPILE_PLATFORM}-${FLAVOR}/lib \

scripts/info.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22

33
URL="https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-${npm_package_config_webkitGTK}"
44
ROOTDIR=$PWD
5-
REVISION=$(svn info --show-item last-changed-revision "${URL}")
5+
6+
export REVISION=$(svn info --show-item last-changed-revision "${URL}")
7+
68
INFO=$(svn info "${URL}")
7-
CONFIG=$(node -e "console.log(require('./package.json').config)")
9+
CONFIG=$(node -e "console.log(require('$ROOTDIR/package.json').config)")
810
APPLE_VERSION=$(svn cat "${URL}/Source/WebCore/Configurations/Version.xcconfig" | grep 'MAJOR_VERSION\s=\|MINOR_VERSION\s=\|TINY_VERSION\s=\|MICRO_VERSION\s=\|NANO_VERSION\s=')
911

10-
SIZE=$(du -ah $ROOTDIR/build/compiled || true)
12+
if [ -d "$ROOTDIR/build/compiled" ]; then
13+
SIZE=$(du -ah $ROOTDIR/build/compiled)
14+
else
15+
SIZE="0"
16+
fi
1117

1218
printf "\n\n\n\n\n\t\t\tRevision: \x1B[32m$REVISION\x1B[0m\n\n\n"
1319
printf "Config:\n$CONFIG\n\n"

scripts/start.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
ROOTDIR=$PWD
44
TARGETDIR=$ROOTDIR/build/target
5-
REVISION=$(svn info --show-item last-changed-revision "https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-${npm_package_config_webkitGTK}")
5+
source $PWD/scripts/info.sh
66

77
patchAndMakeICU() {
88
printf "\n\n\t\t===================== patch and make icu into target/icu/host =====================\n\n"
@@ -61,10 +61,10 @@ createAAR() {
6161
cd $ROOTDIR
6262
}
6363

64-
# export I18N=false
65-
# prep
66-
# compile
67-
# createAAR
64+
export I18N=false
65+
prep
66+
compile
67+
createAAR
6868

6969
export I18N=true
7070
prep

0 commit comments

Comments
 (0)