From 6372cd0d120cbde3f129b972e028e1476520db3a Mon Sep 17 00:00:00 2001 From: Vladimir Mutafov Date: Mon, 14 Nov 2022 12:04:24 +0200 Subject: [PATCH 1/4] build x64 only --- .github/workflows/android.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 3d3ea72..8351ca5 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -57,17 +57,17 @@ jobs: - name: Patch V8 run: scripts/patch.sh android - - name: Build V8 arm - run: | - scripts/build.sh android arm + # - name: Build V8 arm + # run: | + # scripts/build.sh android arm - - name: Build V8 x86 - run: | - scripts/build.sh android x86 + # - name: Build V8 x86 + # run: | + # scripts/build.sh android x86 - - name: Build V8 arm64 - run: | - scripts/build.sh android arm64 + # - name: Build V8 arm64 + # run: | + # scripts/build.sh android arm64 - name: Build V8 x64 run: | From a91405c3898bdf8c6d6574f37c6a44866ef6f2c5 Mon Sep 17 00:00:00 2001 From: Vladimir Mutafov Date: Mon, 14 Nov 2022 15:50:54 +0200 Subject: [PATCH 2/4] patch v8 monolithic snapshot build --- patches/v8_monolith_snapshot.patch | 13 +++++++++++++ scripts/build.sh | 4 ++-- scripts/patch.sh | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 patches/v8_monolith_snapshot.patch diff --git a/patches/v8_monolith_snapshot.patch b/patches/v8_monolith_snapshot.patch new file mode 100644 index 0000000..84bd3c3 --- /dev/null +++ b/patches/v8_monolith_snapshot.patch @@ -0,0 +1,13 @@ +diff --git a/BUILD.gn b/BUILD.gn +index 0063c600b4..d8ec939d9c 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -6037,7 +6037,7 @@ if (v8_monolithic) { + assert(!is_component_build) + + # Using external startup data would produce separate files. +- assert(!v8_use_external_startup_data) ++ # assert(!v8_use_external_startup_data) + v8_static_library("v8_monolith") { + deps = [ + ":v8", diff --git a/scripts/build.sh b/scripts/build.sh index e09aa2c..3adc00a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -8,7 +8,7 @@ ARCH=$2 GN_ARGS_BASE=" is_component_build=false - v8_monolithic=false + v8_monolithic=true v8_static_library=true use_custom_libcxx=false icu_use_data_file=false @@ -110,7 +110,7 @@ function buildArch() copySnapshot $arch copyMkcodecache $arch else - date ; ninja ${NINJA_PARAMS} -C "out.v8.${arch}" v8_base_without_compiler v8_compiler v8_libplatform v8_libbase v8_bigint v8_snapshot torque_generated_initializers torque_generated_definitions cppgc_base v8_heap_base_headers v8_heap_base run_mksnapshot_default; date + date ; ninja ${NINJA_PARAMS} -C "out.v8.${arch}" ; date copyLib $arch copySnapshot $arch # copyMkcodecache $arch diff --git a/scripts/patch.sh b/scripts/patch.sh index 62419b6..f6552da 100755 --- a/scripts/patch.sh +++ b/scripts/patch.sh @@ -5,6 +5,8 @@ source $(dirname $0)/env.sh # Patchset management that manage files by commented purpose ###################################################################################### V8_PATCHSET_ANDROID=( + "v8_monolith_snapshot.patch" + # V8 shared library support # "v8_shared_library.patch" From 1f089329f51ad91c179d59094867ec6978e39c3a Mon Sep 17 00:00:00 2001 From: Vladimir Mutafov Date: Tue, 15 Nov 2022 13:03:48 +0200 Subject: [PATCH 3/4] use api 17 --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 3adc00a..dd3dc3c 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -13,7 +13,7 @@ GN_ARGS_BASE=" use_custom_libcxx=false icu_use_data_file=false treat_warnings_as_errors=false - default_min_sdk_version=21 + default_min_sdk_version=17 symbol_level=0 v8_enable_v8_checks=false v8_enable_debugging_features=false From a9bf41bb55ea3146076f2696c1ea2de0c42674c6 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Thu, 4 May 2023 21:20:14 -0700 Subject: [PATCH 4/4] feat: remove option to build with external startup data, and tools builds (x64) (#6) * Support NPM versions that don't export config environment variables The automatic exportation of environment variables based on the config key in package.json was removed in later versions of Node.js. Here, we manually set the environment variable if it's not automatically set. * Install ninja dep Ninja is a prerequisite for the build. On Ubuntu install it with apt-get, and on GitHub's macOS Docker image it needs to come from Homebrew. * Remove support for external startup data This makes V8 always build with v8_use_external_startup_data=false. Since that was previously controlled by the EXTERNAL_STARTUP_DATA variable, we can remove that variable. If we're not using external startup heap snapshots, we also don't need to export mksnapshot and mkcodecache; they are now only used internally by the V8 build. This also makes a TOOLS_ONLY build and therefore a tools_macos_android build obsolete. Summary: - Remove EXTERNAL_STARTUP_DATA - Remove TOOLS_ONLY - Remove MKSNAPSHOT_ONLY - Remove MKCODECACHE_ONLY - Remove patch to allow monolithic build with external startup data - Remove patch to export mkcodecache - Remove tools_macos_android workflow --- .github/workflows/android.yml | 2 +- .github/workflows/ios.yml | 1 + .github/workflows/tools_macos_android.yml | 59 ----------------------- package.json | 3 +- patches/mkcodecache.patch | 36 -------------- patches/v8_monolith_snapshot.patch | 13 ----- scripts/archive.sh | 28 ----------- scripts/build.sh | 58 ++-------------------- scripts/env.sh | 3 +- scripts/export_npm_env.sh | 3 ++ scripts/patch.sh | 29 ----------- scripts/setup.sh | 19 ++------ scripts/start.sh | 17 ++----- 13 files changed, 19 insertions(+), 252 deletions(-) delete mode 100644 .github/workflows/tools_macos_android.yml delete mode 100644 patches/mkcodecache.patch delete mode 100644 patches/v8_monolith_snapshot.patch diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 8351ca5..74795ac 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -39,7 +39,7 @@ jobs: sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime sudo apt-get update sudo apt-get upgrade -y - sudo apt-get install -y apt-utils sudo lsb-core git python nodejs npm wget openjdk-8-jre openjdk-8-jdk + sudo apt-get install -y apt-utils sudo lsb-core git python ninja-build nodejs npm wget openjdk-8-jre openjdk-8-jdk - name: Export settings from npm package run: npm run export_npm_env diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 90529a8..40cf6c3 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -19,6 +19,7 @@ jobs: - name: Setup V8 build environment run: | brew install coreutils + brew install ninja scripts/setup.sh -r ${V8_VERSION} ios - name: Patch V8 diff --git a/.github/workflows/tools_macos_android.yml b/.github/workflows/tools_macos_android.yml deleted file mode 100644 index c57dfad..0000000 --- a/.github/workflows/tools_macos_android.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: v8-android tools builder for macos host - -on: [workflow_dispatch] - -env: - CACHE_KEY_SUFFIX: v2 - -jobs: - macos: - runs-on: macOS-latest - - strategy: - matrix: - variant: [intl, nointl, jit-intl, jit-nointl] - - env: - NO_INTL: ${{ contains(matrix.variant, 'nointl') }} - NO_JIT: ${{ !contains(matrix.variant, 'jit') }} - TOOLS_ONLY: true - - steps: - - uses: actions/checkout@v3 - - - name: Export settings from npm package - run: npm run export_npm_env - - - name: Setup V8 build environment - run: | - brew install coreutils - scripts/setup.sh -r ${{ env.V8_VERSION }} macos_android - - - name: Patch V8 - run: scripts/patch.sh macos_android - - # - name: Build arm - # run: | - # scripts/build.sh macos_android arm - # - # - name: Build x86 - # run: | - # scripts/build.sh macos_android x86 - - - name: Build arm64 - run: | - scripts/build.sh macos_android arm64 - - - name: Build x64 - run: | - scripts/build.sh macos_android x64 - - - name: Archive - run: | - scripts/archive.sh macos_android - tar -cvf dist.tar dist - - - uses: actions/upload-artifact@v3 - with: - name: macos-tools-${{ matrix.variant }} - path: dist.tar diff --git a/package.json b/package.json index 95da005..8daa827 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,7 @@ "setup_ios": "bash -c '. ./scripts/export_npm_env.sh && ./scripts/setup.sh ios'", "setup_macos_android": "bash -c '. ./scripts/export_npm_env.sh && ./scripts/setup.sh macos_android'", "start": "bash -c '. ./scripts/export_npm_env.sh && ./scripts/start.sh android'", - "start_ios": "bash -c '. ./scripts/export_npm_env.sh && ./scripts/start.sh ios'", - "start_tools_macos_android": "bash -c '. ./scripts/export_npm_env.sh && TOOLS_ONLY=true ./scripts/start.sh macos_android'" + "start_ios": "bash -c '. ./scripts/export_npm_env.sh && ./scripts/start.sh ios'" }, "config": { "V8": "10.3.22" diff --git a/patches/mkcodecache.patch b/patches/mkcodecache.patch deleted file mode 100644 index 7497788..0000000 --- a/patches/mkcodecache.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/BUILD.gn b/BUILD.gn -index 19731feebe..66f28d7313 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -5670,6 +5681,31 @@ if (current_toolchain == v8_generator_toolchain) { - } - } - -+ -+group("mkcodecache_group") { -+ deps = [ ":mkcodecache($v8_generator_toolchain)" ] -+} -+ -+if (current_toolchain == v8_generator_toolchain) { -+ v8_executable("mkcodecache") { -+ visibility = [ ":*" ] # Only targets in this file can depend on this. -+ -+ sources = [ -+ "src/mkcodecache/mkcodecache.cc", -+ ] -+ -+ configs = [ ":internal_config" ] -+ -+ deps = [ -+ ":v8", -+ ":v8_libbase", -+ ":v8_libplatform", -+ ":v8_tracing", -+ "//build/win:default_exe_manifest", -+ ] -+ } -+} -+ - if (current_toolchain == v8_snapshot_toolchain) { - v8_executable("mksnapshot") { - visibility = [ ":*" ] # Only targets in this file can depend on this. diff --git a/patches/v8_monolith_snapshot.patch b/patches/v8_monolith_snapshot.patch deleted file mode 100644 index 84bd3c3..0000000 --- a/patches/v8_monolith_snapshot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/BUILD.gn b/BUILD.gn -index 0063c600b4..d8ec939d9c 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -6037,7 +6037,7 @@ if (v8_monolithic) { - assert(!is_component_build) - - # Using external startup data would produce separate files. -- assert(!v8_use_external_startup_data) -+ # assert(!v8_use_external_startup_data) - v8_static_library("v8_monolith") { - deps = [ - ":v8", diff --git a/scripts/archive.sh b/scripts/archive.sh index 27af0fe..788ac1b 100755 --- a/scripts/archive.sh +++ b/scripts/archive.sh @@ -2,11 +2,6 @@ source $(dirname $0)/env.sh function makeDistPackageDir() { - if [[ ${TOOLS_ONLY} = "true" ]]; then - echo "${DIST_DIR}/packages/v8-android-tools" - return 0 - fi - local jit_suffix="" local intl_suffix="" if [[ ${NO_JIT} != "true" ]]; then @@ -58,25 +53,6 @@ function copyHeaders() { cp -Rf "${V8_DIR}/include" "${DIST_PACKAGE_DIR}/include" } -function copyTools() { - printf "\n\n\t\t===================== adding tools to ${DIST_PACKAGE_DIR}/tools =====================\n\n" - cp -Rf "${BUILD_DIR}/tools" "${DIST_PACKAGE_DIR}/" -} - -function copySnapshotBlobIfNeeded() { - if [[ ${EXTERNAL_STARTUP_DATA} = "true" || ${TOOLS_ONLY} = "true" ]]; then - printf "\n\n\t\t===================== adding snapshot_blob to ${DIST_PACKAGE_DIR}/snapshot_blob =====================\n\n" - cp -Rf "${BUILD_DIR}/snapshot_blob" "${DIST_PACKAGE_DIR}/" - fi -} - - -if [[ ${TOOLS_ONLY} = "true" ]]; then - mkdir -p "$DIST_PACKAGE_DIR" - copyTools - exit 0 -fi - if [[ ${PLATFORM} = "android" ]]; then # export ANDROID_HOME="${V8_DIR}/third_party/android_sdk/public" # export ANDROID_NDK="${V8_DIR}/third_party/android_ndk" @@ -87,11 +63,7 @@ if [[ ${PLATFORM} = "android" ]]; then copyDylib # copyAndroidTools # copyHeaders - # copyTools - copySnapshotBlobIfNeeded elif [[ ${PLATFORM} = "ios" ]]; then copyDylib # copyHeaders - # copyTools - # copySnapshotBlobIfNeeded fi diff --git a/scripts/build.sh b/scripts/build.sh index dd3dc3c..77151bc 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -18,15 +18,11 @@ GN_ARGS_BASE=" v8_enable_v8_checks=false v8_enable_debugging_features=false v8_enable_webassembly=true + v8_use_external_startup_data=false is_official_build=true + target_os=\"${PLATFORM}\" " -if [[ ${PLATFORM} = "macos_android" ]]; then - GN_ARGS_BASE="${GN_ARGS_BASE} target_os=\"android\" host_cpu=\"x64\"" -else - GN_ARGS_BASE="${GN_ARGS_BASE} target_os=\"${PLATFORM}\"" -fi - if [[ ${PLATFORM} = "ios" ]]; then GN_ARGS_BASE="${GN_ARGS_BASE} enable_ios_bitcode=false use_xcode_clang=true ios_enable_code_signing=false v8_enable_pointer_compression=false ios_deployment_target=\"${IOS_DEPLOYMENT_TARGET}\"" elif [[ ${PLATFORM} = "android" ]]; then @@ -42,12 +38,6 @@ if [[ ${NO_JIT} = "true" ]]; then GN_ARGS_BASE="${GN_ARGS_BASE} v8_enable_lite_mode=true" fi -if [[ ${EXTERNAL_STARTUP_DATA} = "true" || ${TOOLS_ONLY} = "true" ]]; then - GN_ARGS_BASE="${GN_ARGS_BASE} v8_use_external_startup_data=true" -else - GN_ARGS_BASE="${GN_ARGS_BASE} v8_use_external_startup_data=false" -fi - if [[ "$BUILD_TYPE" = "Debug" ]] then GN_ARGS_BUILD_TYPE=' @@ -105,16 +95,8 @@ function buildArch() echo "Build v8 ${arch} variant NO_INTL=${NO_INTL} NO_JIT=${NO_JIT}" gn gen --args="${GN_ARGS_BASE} ${GN_ARGS_BUILD_TYPE} v8_target_cpu=\"${arch}\" target_cpu=\"${arch}\"" "out.v8.${arch}" - if [[ ${TOOLS_ONLY} = "true" ]]; then - date ; ninja ${NINJA_PARAMS} -C "out.v8.${arch}" run_mksnapshot_default mkcodecache_group ; date - copySnapshot $arch - copyMkcodecache $arch - else - date ; ninja ${NINJA_PARAMS} -C "out.v8.${arch}" ; date - copyLib $arch - copySnapshot $arch - # copyMkcodecache $arch - fi + date ; ninja ${NINJA_PARAMS} -C "out.v8.${arch}" ; date + copyLib $arch } function copyLib() @@ -131,33 +113,6 @@ function copyLib() fi } -function copySnapshot() -{ - local arch=$1 - local platform_arch=$(normalize_arch_for_platform $arch) - - mkdir -p "${BUILD_DIR}/tools/${PLATFORM}/${platform_arch}" - cp -f out.v8.${arch}/clang_*/mksnapshot "${BUILD_DIR}/tools/${PLATFORM}/${platform_arch}/mksnapshot" - - if [[ ${EXTERNAL_STARTUP_DATA} = "true" || ${TOOLS_ONLY} = "true" ]]; then - mkdir -p "${BUILD_DIR}/snapshot_blob/${platform_arch}" - cp -f out.v8.${arch}/snapshot_blob.bin "${BUILD_DIR}/snapshot_blob/${platform_arch}/snapshot_blob.bin" - fi -} - -function copyMkcodecache() -{ - local arch=$1 - local platform_arch=$(normalize_arch_for_platform $arch) - - mkdir -p "${BUILD_DIR}/tools/${PLATFORM}/${platform_arch}" - cp -f out.v8.${arch}/clang_*/mkcodecache "${BUILD_DIR}/tools/${PLATFORM}/${platform_arch}/mkcodecache" - - if [[ ${EXTERNAL_STARTUP_DATA} = "true" || ${TOOLS_ONLY} = "true" ]]; then - cp -f out.v8.${arch}/clang_*/snapshot_blob.bin "${BUILD_DIR}/tools/${PLATFORM}/${platform_arch}/snapshot_blob.bin" - fi -} - if [[ ${ARCH} ]]; then buildArch "${ARCH}" elif [[ ${PLATFORM} = "android" ]]; then @@ -168,9 +123,4 @@ elif [[ ${PLATFORM} = "android" ]]; then elif [[ ${PLATFORM} = "ios" ]]; then buildArch "arm64" # buildArch "x64" -elif [[ ${PLATFORM} = "macos_android" ]]; then - # buildArch "arm" - # buildArch "x86" - buildArch "arm64" - buildArch "x64" fi diff --git a/scripts/env.sh b/scripts/env.sh index 87cc8c9..8fb1364 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -17,7 +17,7 @@ function abs_path() function verify_platform() { local arg=$1 - SUPPORTED_PLATFORMS=(android ios macos_android) + SUPPORTED_PLATFORMS=(android ios) local valid_platform= for platform in ${SUPPORTED_PLATFORMS[@]} do @@ -44,7 +44,6 @@ PATCHES_DIR="${ROOT_DIR}/patches" NDK_VERSION="r21e" IOS_DEPLOYMENT_TARGET="9" -EXTERNAL_STARTUP_DATA="true" export PATH="$DEPOT_TOOLS_DIR:$PATH" PLATFORM=$(verify_platform $1) diff --git a/scripts/export_npm_env.sh b/scripts/export_npm_env.sh index b56601b..3868668 100755 --- a/scripts/export_npm_env.sh +++ b/scripts/export_npm_env.sh @@ -1,4 +1,7 @@ #!/bin/bash -e + +npm_package_config_V8=${npm_package_config_V8:-$(node -p 'require("./package.json").config.V8')} + if [[ ${CIRCLECI} ]]; then echo "export VERSION=${npm_package_version}" >> $BASH_ENV echo "export V8_VERSION=${npm_package_config_V8}" >> $BASH_ENV diff --git a/scripts/patch.sh b/scripts/patch.sh index f6552da..f1df4ee 100755 --- a/scripts/patch.sh +++ b/scripts/patch.sh @@ -5,8 +5,6 @@ source $(dirname $0)/env.sh # Patchset management that manage files by commented purpose ###################################################################################### V8_PATCHSET_ANDROID=( - "v8_monolith_snapshot.patch" - # V8 shared library support # "v8_shared_library.patch" @@ -24,9 +22,6 @@ V8_PATCHSET_ANDROID=( # revert https://chromium.googlesource.com/chromium/src/build/+/7bb5f36104 "v8_97_android_unwind_link_error.patch" - # Add mkcodecache tool - "mkcodecache.patch" - # Fix for [react-native-bottom-sheet](https://github.com/gorhom/react-native-bottom-sheet) not working # revert https://chromium-review.googlesource.com/c/v8/v8/+/3548458 # "fix_for_bottom_sheet.patch" @@ -45,19 +40,11 @@ V8_PATCHSET_IOS=( # Fix use_system_xcode build error "system_xcode_build_error.patch" - # Add mkcodecache tool - "mkcodecache.patch" - # Fix for [react-native-bottom-sheet](https://github.com/gorhom/react-native-bottom-sheet) not working # revert https://chromium-review.googlesource.com/c/v8/v8/+/3548458 # "fix_for_bottom_sheet.patch" ) -V8_PATCHSET_MACOS_ANDROID=( - # Add mkcodecache tool - "mkcodecache.patch" -) - ###################################################################################### # Patchset management end ###################################################################################### @@ -73,11 +60,6 @@ function setupNDK() { unset ndk_major_version } -function setupMkCodecache() { - mkdir -p "${V8_DIR}/src/mkcodecache" - cp -f "${ROOT_DIR}/mkcodecache/mkcodecache.cc" "${V8_DIR}/src/mkcodecache/" -} - if [[ ${PLATFORM} = "android" ]]; then for patch in "${V8_PATCHSET_ANDROID[@]}" do @@ -86,7 +68,6 @@ if [[ ${PLATFORM} = "android" ]]; then done setupNDK - setupMkCodecache elif [[ ${PLATFORM} = "ios" ]]; then for patch in "${V8_PATCHSET_IOS[@]}" do @@ -94,14 +75,4 @@ elif [[ ${PLATFORM} = "ios" ]]; then patch -d "${V8_DIR}" -p1 < "${PATCHES_DIR}/$patch" done - setupMkCodecache -elif [[ ${PLATFORM} = "macos_android" ]]; then - for patch in "${V8_PATCHSET_MACOS_ANDROID[@]}" - do - printf "### Patch set: ${patch}\n" - patch -d "${V8_DIR}" -p1 < "${PATCHES_DIR}/$patch" - done - - setupNDK - setupMkCodecache fi diff --git a/scripts/setup.sh b/scripts/setup.sh index 1429c35..beb7079 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -17,12 +17,12 @@ source $(dirname $0)/env.sh # Install NDK function installNDK() { - local host_arch=$1 + local ndk_filename="android-ndk-${NDK_VERSION}-linux-x86_64.zip" pushd . cd "${V8_DIR}" - wget -q https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-${host_arch}-x86_64.zip - unzip -q android-ndk-${NDK_VERSION}-${host_arch}-x86_64.zip - rm -f android-ndk-${NDK_VERSION}-${host_arch}-x86_64.zip + wget -q "https://dl.google.com/android/repository/${ndk_filename}" + unzip -q "$ndk_filename" + rm -f "$ndk_filename" popd } @@ -70,15 +70,6 @@ if [[ ${PLATFORM} = "android" ]]; then # Workaround to install missing android_sdk tools gclient sync --deps=android - installNDK "linux" - exit 0 -fi - -if [[ ${PLATFORM} = "macos_android" ]]; then - gclient sync --deps=android ${GCLIENT_SYNC_ARGS} || true - sed -i "" "s#2c2138e811487b13020eb331482fb991fd399d4e#083aa67a0d3309ebe37eafbe7bfd96c235a019cf#g" v8/DEPS - gclient sync --deps=android - - installNDK "darwin" + installNDK exit 0 fi diff --git a/scripts/start.sh b/scripts/start.sh index 9852a87..768c6e8 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -7,21 +7,10 @@ fi cd "${V8_DIR}" -if [[ ${MKSNAPSHOT_ONLY} = "true" ]]; then - gclient sync --reset --with_branch_head --revision ${V8_VERSION} -elif [[ ${MKCODECACHE_ONLY} = "true" ]]; then - gclient sync --deps=android --reset --with_branch_head --revision ${V8_VERSION} -else - gclient sync --deps=${PLATFORM} --reset --with_branch_head --revision ${V8_VERSION} -fi +gclient sync --deps=${PLATFORM} --reset --with_branch_head --revision ${V8_VERSION} cd "${ROOT_DIR}" scripts/patch.sh ${PLATFORM} -scripts/build.sh ${PLATFORM} -scripts/archive.sh ${PLATFORM} - -if [[ ${TOOLS_ONLY} != "true" ]]; then - NO_INTL=true scripts/build.sh ${PLATFORM} - NO_INTL=true scripts/archive.sh ${PLATFORM} -fi +NO_INTL=true scripts/build.sh ${PLATFORM} +NO_INTL=true scripts/archive.sh ${PLATFORM}