Skip to content

Commit

Permalink
initial commit for 7.3-lkgr
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews committed Mar 23, 2019
1 parent 4fd43ec commit 1ce564b
Show file tree
Hide file tree
Showing 7 changed files with 499 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ def build(scm, arch, mode) {
def expectedLibraries = ['monolith']
def labels = 'ninja && git && android-ndk && android-sdk && python'
if (arch.equals('ia32') || arch.equals('arm')) {
labels += ' && (linux || (osx && xcode-9))' // Need xcode-9 or older on mac, as 32-bit x86 was removed in xcode 10
labels += ' && (osx && xcode-9)' // Need xcode-9 or older on mac, as 32-bit x86 was removed in xcode 10
} else {
// 64-bit can be built on xcode 10, so we can use linux or osx
labels += ' && (linux || osx)'
labels += ' && osx'
}

node(labels) {
Expand Down Expand Up @@ -41,7 +41,7 @@ def build(scm, arch, mode) {
// Force a git clean on everything under v8
sh '../depot_tools/gclient recurse git clean -fdx'
// Then apply our patch to avoid grabbing android sdk/ndk
sh 'git apply ../ndkr16b_7.1.patch'
sh 'git apply ../ndkr16b_7.3.patch'
// Now let gclient get the dependencies.
sh '../depot_tools/gclient sync --shallow --no-history --reset --force' // needs python
}
Expand Down
25 changes: 25 additions & 0 deletions android.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 656be483d6053db7dcb8f83d4c79c68dc732c1d5 Mon Sep 17 00:00:00 2001
From: Gary Mathews <gmathews@appcelerator.com>
Date: Sat, 23 Mar 2019 09:57:46 -0700
Subject: [PATCH] fix android stdout

---
infra/mb/mb_config.pyl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infra/mb/mb_config.pyl b/infra/mb/mb_config.pyl
index 8a6cba71e0..d2004c086e 100644
--- a/infra/mb/mb_config.pyl
+++ b/infra/mb/mb_config.pyl
@@ -569,7 +569,7 @@

'mixins': {
'android': {
- 'gn_args': 'target_os="android" v8_android_log_stdout=true',
+ 'gn_args': 'target_os="android" v8_android_log_stdout=false',
},

'android_strip_outputs': {
--
2.17.2 (Apple Git-113)

17 changes: 15 additions & 2 deletions build_mac_v8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,30 @@ else
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
fi

rm -rf build/

export PATH=`pwd`/depot_tools:"$PATH"
cd v8
git checkout -- . # "clean" the v8 directory
rm -rf out.gn/
git apply ../ndkr16b_6.7.patch
echo "Asking gclient to clean v8 dependencies"
../depot_tools/gclient recurse git clean -fdx
echo "Applying patches"
git apply ../ndkr16b_7.3.patch
git apply ../compat.patch
git apply ../android.patch
echo "Asking gclient to update v8 dependencies"
gclient sync --shallow --no-history
../depot_tools/gclient sync --shallow --no-history --reset --force
cd ..
# wget http://dl.google.com/android/repository/android-ndk-r16b-darwin-x86_64.zip
# unzip android-ndk-r16b-darwin-x86_64.zip
# export ANDROID_NDK=${PWD}/android-ndk-r16b

echo "Cleaning v8 build"
./build_v8.sh -c
# Now manually clean since that usually fails trying to clean non-existant tags dir
rm -rf build/

echo "Building v8 for x86..."
./build_v8.sh "-j" "8" "-l" "ia32" "-m" "release"
echo "Building v8 for ARM..."
Expand Down
19 changes: 18 additions & 1 deletion build_v8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ buildV8()

# Build V8
MAKE_TARGET="android_$BUILD_LIB_VERSION.$BUILD_MODE"
tools/dev/v8gen.py gen --no-goma -b "$BUILDER_NAME" -m $BUILDER_GROUP $MAKE_TARGET -- use_goma=false v8_use_snapshot=false v8_static_library=true v8_enable_i18n_support=false icu_use_data_file=false android_sdk_root=\"$SDK_DIR\" android_ndk_root=\"$NDK_DIR\" android_ndk_major_version=16 android_ndk_version=\"r16b\" v8_monolithic=true target_os=\"android\" v8_android_log_stdout=true
tools/dev/v8gen.py gen --no-goma -b "$BUILDER_NAME" -m $BUILDER_GROUP $MAKE_TARGET -- use_goma=false v8_use_snapshot=true v8_enable_embedded_builtins=false v8_use_external_startup_data=false v8_static_library=true v8_enable_i18n_support=false android_sdk_root=\"$SDK_DIR\" android_ndk_root=\"$NDK_DIR\" android_ndk_major_version=16 android_ndk_version=\"r16b\" v8_monolithic=true target_os=\"android\" v8_android_log_stdout=true
# Hack one of the toolchain items to fix AR executable used for android
cp ../overrides/build/toolchain/android/BUILD.gn "$V8_DIR/build/toolchain/android/BUILD.gn"
ninja -C out.gn/$MAKE_TARGET -j $NUM_CPUS v8_monolith
Expand All @@ -123,6 +123,23 @@ buildV8()
DEST_DIR="$BUILD_DIR/$BUILD_MODE"
mkdir -p "$DEST_DIR/libs/$ARCH" 2>/dev/null || echo
cp "$V8_DIR/out.gn/$MAKE_TARGET/obj/libv8_monolith.a" "$DEST_DIR/libs/$ARCH/libv8_monolith.a"

MKSNAPSHOT_X86="$V8_DIR/out.gn/$MAKE_TARGET/clang_x86/mksnapshot"
if [ -f $MKSNAPSHOT_X86 ]; then
cp $MKSNAPSHOT_X86 "$DEST_DIR/libs/$ARCH/mksnapshot"
fi
MKSNAPSHOT_X64="$V8_DIR/out.gn/$MAKE_TARGET/clang_x64/mksnapshot"
if [ -f $MKSNAPSHOT_X64 ]; then
cp $MKSNAPSHOT_X64 "$DEST_DIR/libs/$ARCH/mksnapshot"
fi
MKSNAPSHOT_ARM="$V8_DIR/out.gn/$MAKE_TARGET/clang_x86_v8_arm/mksnapshot"
if [ -f $MKSNAPSHOT_ARM ]; then
cp $MKSNAPSHOT_ARM "$DEST_DIR/libs/$ARCH/mksnapshot"
fi
MKSNAPSHOT_ARM64="$V8_DIR/out.gn/$MAKE_TARGET/clang_x64_v8_arm64/mksnapshot"
if [ -f $MKSNAPSHOT_ARM64 ]; then
cp $MKSNAPSHOT_ARM64 "$DEST_DIR/libs/$ARCH/mksnapshot"
fi
}

buildThirdparty()
Expand Down

0 comments on commit 1ce564b

Please sign in to comment.