summaryrefslogtreecommitdiff
path: root/deps/build_v8
blob: 2c8b780bedb23814de1d664a43ae1dcff560b89b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/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 ./node/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 ./node/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=compiled/armeabi-v7a/
mkdir -p $x
cp node/deps/v8/out.gn/arm.$mode/*.so $x/