diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-07 23:22:08 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-07 23:22:08 +0200 |
commit | 0feffa6d47f6d8f1a34637147af54110c590d350 (patch) | |
tree | 7a5b33a4e53501ca6c0ba2936edc9a81a01c54d0 | |
parent | a79ae5679c808f8d412a6f3b4c58ea949194d2e9 (diff) | |
download | android-node-v8-0feffa6d47f6d8f1a34637147af54110c590d350.tar.gz android-node-v8-0feffa6d47f6d8f1a34637147af54110c590d350.tar.bz2 android-node-v8-0feffa6d47f6d8f1a34637147af54110c590d350.zip |
move android build files
-rwxr-xr-x | build-android-v8 | 47 | ||||
-rw-r--r-- | taler-android-build/.gitignore | 1 | ||||
-rwxr-xr-x | taler-android-build/build-android-node (renamed from build-android-node) | 11 | ||||
-rwxr-xr-x | taler-android-build/build-android-v8 | 54 |
4 files changed, 61 insertions, 52 deletions
diff --git a/build-android-v8 b/build-android-v8 deleted file mode 100755 index 9fa04cdcad..0000000000 --- a/build-android-v8 +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -set -eu -o pipefail - -scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -cd $scriptdir - -NDK=$1 - -DEST_CPU_ARCH='arm' -API_LEVEL=26 -BUILD_HOST_TAG='linux-x86_64' -TOOLCHAIN_DIR=$NDK/toolchains/llvm/prebuilt/$BUILD_HOST_TAG/ - -if [[ ! -d "$NDK" ]]; then - echo "Android NDK directory '$NDK' invalid" - exit 1 -fi - -ln -fs $NDK ./deps/v8/third_party/android_ndk - -# We do not export anything about the tool chain, as v8 -# will pick their own toolchain for android from the ndk - -cd ./deps/v8 - -python2 ./tools/node/fetch_deps.py $PWD - -mode=debug - -./tools/dev/v8gen.py arm.$mode -- \ - 'target_os="android"' \ - 'target_cpu="arm"' \ - 'is_component_build=true' \ - 'v8_android_log_stdout=true' \ - 'v8_use_external_startup_data=false' \ - 'v8_use_snapshot=true' \ - 'v8_enable_debugging_features=true' \ - 'v8_enable_embedded_builtins=true' \ - 'is_clang=true' - -./_depot_tools/ninja -C out.gn/arm.$mode v8 d8 - -cd $scriptdir -x=android-compiled/armeabi-v7a/ -mkdir -p $x -cp deps/v8/out.gn/arm.$mode/*.so $x/ diff --git a/taler-android-build/.gitignore b/taler-android-build/.gitignore new file mode 100644 index 0000000000..724bbe1c11 --- /dev/null +++ b/taler-android-build/.gitignore @@ -0,0 +1 @@ +compiled/ diff --git a/build-android-node b/taler-android-build/build-android-node index 497b2c9a3c..8ebca5c2a1 100755 --- a/build-android-node +++ b/taler-android-build/build-android-node @@ -3,7 +3,7 @@ set -eu -o pipefail scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -cd $scriptdir +cd $scriptdir/.. NDK=$1 @@ -36,9 +36,10 @@ export GYP_DEFINES="OS=android clang=1" function myconf() { ./configure \ + --ninja \ + --cross-compiling \ --dest-cpu=$DEST_CPU_ARCH \ --dest-os=android \ - --without-snapshot \ --without-intl \ --openssl-no-asm \ --without-bundled-v8 \ @@ -47,10 +48,10 @@ function myconf() { if [ -z ${2+x} ]; then myconf && make - cd $scriptdir - x=android-compiled/armeabi-v7a/ + cd $scriptdir/.. + x=$scriptdir/compiled/armeabi-v7a/ mkdir -p $x - cp out/Release/lib.target/libnode.so $x/ + cp out/Release/lib/libnode.so $x/ else eval $2 fi diff --git a/taler-android-build/build-android-v8 b/taler-android-build/build-android-v8 new file mode 100755 index 0000000000..e2f59278c0 --- /dev/null +++ b/taler-android-build/build-android-v8 @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +set -eu -o pipefail + +scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +cd $scriptdir/.. + +NDK=$1 + +DEST_CPU_ARCH='arm' +API_LEVEL=26 +BUILD_HOST_TAG='linux-x86_64' +TOOLCHAIN_DIR=$NDK/toolchains/llvm/prebuilt/$BUILD_HOST_TAG/ + +if [[ ! -d "$NDK" ]]; then + echo "Android NDK directory '$NDK' invalid" + exit 1 +fi + +ln -fs $NDK ./deps/v8/third_party/android_ndk + +# We do not export anything about the tool chain, as v8 +# will pick their own toolchain for android from the ndk + +cd ./deps/v8 + +python2 ./tools/node/fetch_deps.py $PWD + +gn_args=' +is_debug = true +v8_enable_backtrace = true +v8_enable_slow_dchecks = true +v8_optimized_debug = false +v8_target_cpu = "arm" +target_os="android" +target_cpu="arm" +is_component_build=true +v8_android_log_stdout=true +v8_use_external_startup_data=false +v8_use_snapshot=true +v8_enable_debugging_features=true +v8_enable_embedded_builtins=true +is_clang=true +use_custom_libcxx=false +' + +./_depot_tools/gn gen out.gn/arm-android "--args=$gn_args" + +./_depot_tools/ninja -C out.gn/arm-android v8 d8 + +cd $scriptdir/.. +x=$scriptdir/compiled/armeabi-v7a/ +mkdir -p $x +cp deps/v8/out.gn/arm-android/*.so $x/ |