diff --git a/.gclient_entries b/.gclient_entries index f0407ac..c675980 100644 --- a/.gclient_entries +++ b/.gclient_entries @@ -1,31 +1,45 @@ entries = { 'v8': 'https://chromium.googlesource.com/v8/v8.git', - 'v8/base/trace_event/common': 'https://chromium.googlesource.com/chromium/src/base/trace_event/common.git@5e4fce17a9d2439c44a7b57ceecef6df9287ec2f', - 'v8/build': 'https://chromium.googlesource.com/chromium/src/build.git@693faeda4ee025796c7e473d953a5a7b6ad64c93', - 'v8/buildtools': 'https://chromium.googlesource.com/chromium/src/buildtools.git@74cfb57006f83cfe050817526db359d5c8a11628', - 'v8/buildtools/clang_format/script': 'https://chromium.googlesource.com/chromium/llvm-project/cfe/tools/clang-format.git@96636aa0e9f047f17447f2d45a094d0b59ed7917', - 'v8/buildtools/mac:gn/gn/mac-amd64': 'https://chrome-infra-packages.appspot.com/gn/gn/mac-amd64@git_revision:152c5144ceed9592c20f0c8fd55769646077569b', - 'v8/buildtools/third_party/libc++/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxx.git@5938e0582bac570a41edb3d6a2217c299adc1bc6', - 'v8/buildtools/third_party/libc++abi/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxxabi.git@0d529660e32d77d9111912d73f2c74fc5fa2a858', - 'v8/buildtools/third_party/libunwind/trunk': 'https://chromium.googlesource.com/external/llvm.org/libunwind.git@69d9b84cca8354117b9fe9705a4430d789ee599b', + 'v8/base/trace_event/common': 'https://chromium.googlesource.com/chromium/src/base/trace_event/common.git@3da1e2fcf66acd5c7194497b4285ac163f32e239', + 'v8/build': 'https://chromium.googlesource.com/chromium/src/build.git@bbf7f0ed65548c4df862d2a2748e3a9b908a3217', + 'v8/buildtools': 'https://chromium.googlesource.com/chromium/src/buildtools.git@37dc929ecb351687006a61744b116cda601753d7', + 'v8/buildtools/clang_format/script': 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git@99803d74e35962f63a775f29477882afd4d57d94', + 'v8/buildtools/linux64:gn/gn/linux-amd64': 'https://chrome-infra-packages.appspot.com/gn/gn/linux-amd64@git_revision:eea3906f0e2a8d3622080127d2005ff214d51383', + 'v8/buildtools/third_party/libc++/trunk': 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git@79a2e924d96e2fc1e4b937c42efd08898fa472d7', + 'v8/buildtools/third_party/libc++abi/trunk': 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git@24e92c2beed59b76ddabe7ceb5ee4b40f09e0712', + 'v8/buildtools/third_party/libunwind/trunk': 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git@b825591df326b2725e6b88bdf74fdc88fefdf460', 'v8/test/benchmarks/data': 'https://chromium.googlesource.com/v8/deps/third_party/benchmarks.git@05d7188267b4560491ff9155c5ee13e207ecd65f', 'v8/test/mozilla/data': 'https://chromium.googlesource.com/v8/deps/third_party/mozilla-tests.git@f6c578a10ea707b1a8ab0b88943fe5115ce2b9be', - 'v8/test/test262/data': 'https://chromium.googlesource.com/external/github.com/tc39/test262.git@59a1a016b7cf5cf43f66b274c7d1db4ec6066935', - 'v8/test/test262/harness': 'https://chromium.googlesource.com/external/github.com/test262-utils/test262-harness-py.git@4555345a943d0c99a9461182705543fb171dda4b', - 'v8/third_party/catapult': 'https://chromium.googlesource.com/catapult.git@e7c719c3e85f76938bf4fef0ba37c27f89246f71', + 'v8/test/test262/data': 'https://chromium.googlesource.com/external/github.com/tc39/test262.git@ab353c6e732b9e175d3ad6779e3acf3ea82d3761', + 'v8/test/test262/harness': 'https://chromium.googlesource.com/external/github.com/test262-utils/test262-harness-py.git@278bcfaed0dcaa13936831fb1769d15e7c1e3b2b', + 'v8/third_party/android_ndk': 'https://chromium.googlesource.com/android_ndk.git@401019bf85744311b26c88ced255cd53401af8b7', + 'v8/third_party/android_platform': 'https://chromium.googlesource.com/chromium/src/third_party/android_platform.git@e98c753917587d320f4e7a24f1c7474535adac3f', + 'v8/third_party/android_sdk/public:chromium/third_party/android_sdk/public/build-tools/31.0.0': 'https://chrome-infra-packages.appspot.com/chromium/third_party/android_sdk/public/build-tools/31.0.0@tRoD45SCi7UleQqSV7MrMQO1_e5P8ysphkCcj6z_cCQC', + 'v8/third_party/android_sdk/public:chromium/third_party/android_sdk/public/cmdline-tools': 'https://chrome-infra-packages.appspot.com/chromium/third_party/android_sdk/public/cmdline-tools@ZT3JmI6GMG4YVcZ1OtECRVMOLLJAWAdPbi-OclubJLMC', + 'v8/third_party/android_sdk/public:chromium/third_party/android_sdk/public/emulator': 'https://chrome-infra-packages.appspot.com/chromium/third_party/android_sdk/public/emulator@gMHhUuoQRKfxr-MBn3fNNXZtkAVXtOwMwT7kfx8jkIgC', + 'v8/third_party/android_sdk/public:chromium/third_party/android_sdk/public/extras': 'https://chrome-infra-packages.appspot.com/chromium/third_party/android_sdk/public/extras@ppQ4TnqDvBHQ3lXx5KPq97egzF5X2FFyOrVHkGmiTMQC', + 'v8/third_party/android_sdk/public:chromium/third_party/android_sdk/public/patcher': 'https://chrome-infra-packages.appspot.com/chromium/third_party/android_sdk/public/patcher@I6FNMhrXlpB-E1lOhMlvld7xt9lBVNOO83KIluXDyA0C', + 'v8/third_party/android_sdk/public:chromium/third_party/android_sdk/public/platform-tools': 'https://chrome-infra-packages.appspot.com/chromium/third_party/android_sdk/public/platform-tools@qi_k82nm6j9nz4dQosOoqXew4_TFAy8rcGOHDLptx1sC', + 'v8/third_party/android_sdk/public:chromium/third_party/android_sdk/public/platforms/android-31': 'https://chrome-infra-packages.appspot.com/chromium/third_party/android_sdk/public/platforms/android-31@lL3IGexKjYlwjO_1Ga-xwxgwbE_w-lmi2Zi1uOlWUIAC', + 'v8/third_party/android_sdk/public:chromium/third_party/android_sdk/public/sources/android-30': 'https://chrome-infra-packages.appspot.com/chromium/third_party/android_sdk/public/sources/android-30@n7svc8KYah-i4s8zwkVa85SI3_H0WFOniP0mpwNdFO0C', + 'v8/third_party/catapult': 'https://chromium.googlesource.com/catapult.git@abc7ba7d871fe3c25b0a1bec7fc84fb309034cb7', 'v8/third_party/colorama/src': 'https://chromium.googlesource.com/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', - 'v8/third_party/depot_tools': 'https://chromium.googlesource.com/chromium/tools/depot_tools.git@f38bc1796282c61087dcf15abc61b8fd18a68402', - 'v8/third_party/googletest/src': 'https://chromium.googlesource.com/external/github.com/google/googletest.git@565f1b848215b77c3732bca345fe76a0431d8b34', - 'v8/third_party/icu': 'https://chromium.googlesource.com/chromium/deps/icu.git@53f6b233a41ec982d8445996247093f7aaf41639', - 'v8/third_party/instrumented_libraries': 'https://chromium.googlesource.com/chromium/src/third_party/instrumented_libraries.git@b1c3ca20848c117eb935b02c25d441f03e6fbc5e', - 'v8/third_party/jinja2': 'https://chromium.googlesource.com/chromium/src/third_party/jinja2.git@b41863e42637544c2941b574c7877d3e1f663e25', - 'v8/third_party/markupsafe': 'https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git@8f45f5cfa0009d2a70589bcda0349b8cb2b72783', - 'v8/third_party/perfetto': 'https://android.googlesource.com/platform/external/perfetto.git@01615892494a9a8dc84414962d0a817bf97de2c2', - 'v8/third_party/protobuf': 'https://chromium.googlesource.com/external/github.com/google/protobuf@b68a347f56137b4b1a746e8c7438495a6ac1bd91', - 'v8/tools/clang': 'https://chromium.googlesource.com/chromium/src/tools/clang.git@2fef805e5b05b26a8c87c47865590b5f43218611', - 'v8/tools/clang/dsymutil:chromium/llvm-build-tools/dsymutil': 'https://chrome-infra-packages.appspot.com/chromium/llvm-build-tools/dsymutil@OWlhXkmj18li3yhJk59Kmjbc5KdgLh56TwCd1qBdzlIC', - 'v8/tools/luci-go:infra/tools/luci/isolate/${platform}': 'https://chrome-infra-packages.appspot.com/infra/tools/luci/isolate/${platform}@git_revision:7d11fd9e66407c49cb6c8546a2ae45ea993a240c', - 'v8/tools/luci-go:infra/tools/luci/isolated/${platform}': 'https://chrome-infra-packages.appspot.com/infra/tools/luci/isolated/${platform}@git_revision:7d11fd9e66407c49cb6c8546a2ae45ea993a240c', - 'v8/tools/luci-go:infra/tools/luci/swarming/${platform}': 'https://chrome-infra-packages.appspot.com/infra/tools/luci/swarming/${platform}@git_revision:7d11fd9e66407c49cb6c8546a2ae45ea993a240c', - 'v8/tools/swarming_client': 'https://chromium.googlesource.com/infra/luci/client-py.git@96f125709acfd0b48fc1e5dae7d6ea42291726ac', + 'v8/third_party/depot_tools': 'https://chromium.googlesource.com/chromium/tools/depot_tools.git@49a703f3d915b140c9f373107e1ba17f30e2487d', + 'v8/third_party/google_benchmark/src': 'https://chromium.googlesource.com/external/github.com/google/benchmark.git@4124223bf5303d1d65fe2c40f33e28372bbb986c', + 'v8/third_party/googletest/src': 'https://chromium.googlesource.com/external/github.com/google/googletest.git@47f819c3ca54fb602f432904443e00a0a1fe2f42', + 'v8/third_party/icu': 'https://chromium.googlesource.com/chromium/deps/icu.git@75e34bcccea0be165c31fdb278b3712c516c5876', + 'v8/third_party/instrumented_libraries': 'https://chromium.googlesource.com/chromium/src/third_party/instrumented_libraries.git@9a8087bbbf43a355950fc1667575d1a753f8aaa4', + 'v8/third_party/jinja2': 'https://chromium.googlesource.com/chromium/src/third_party/jinja2.git@7c54c1f227727e0c4c1d3dc19dd71cd601a2db95', + 'v8/third_party/jsoncpp/source': 'https://chromium.googlesource.com/external/github.com/open-source-parsers/jsoncpp.git@9059f5cad030ba11d37818847443a53918c327b1', + 'v8/third_party/logdog/logdog': 'https://chromium.googlesource.com/infra/luci/luci-py/client/libs/logdog@17ec234f823f7bff6ada6584fdbbee9d54b8fc58', + 'v8/third_party/markupsafe': 'https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git@1b882ef6372b58bfd55a3285f37ed801be9137cd', + 'v8/third_party/perfetto': 'https://android.googlesource.com/platform/external/perfetto.git@aa4385bc5997ecad4c633885e1b331b1115012fb', + 'v8/third_party/protobuf': 'https://chromium.googlesource.com/external/github.com/google/protobuf@6a59a2ad1f61d9696092f79b6d74368b4d7970a3', + 'v8/third_party/requests': 'https://chromium.googlesource.com/external/github.com/kennethreitz/requests.git@refs/tags/v2.23.0', + 'v8/third_party/zlib': 'https://chromium.googlesource.com/chromium/src/third_party/zlib.git@563140dd9c24f84bf40919196e9e7666d351cc0d', + 'v8/tools/clang': 'https://chromium.googlesource.com/chromium/src/tools/clang.git@6a8e571efd68de48d226950d1e10cb8982e71496', + 'v8/tools/luci-go:infra/tools/luci/isolate/${platform}': 'https://chrome-infra-packages.appspot.com/infra/tools/luci/isolate/${platform}@git_revision:1120f810b7ab7eb71bd618c4c57fe82a60d4f2fe', + 'v8/tools/luci-go:infra/tools/luci/isolated/${platform}': 'https://chrome-infra-packages.appspot.com/infra/tools/luci/isolated/${platform}@git_revision:1120f810b7ab7eb71bd618c4c57fe82a60d4f2fe', + 'v8/tools/luci-go:infra/tools/luci/swarming/${platform}': 'https://chrome-infra-packages.appspot.com/infra/tools/luci/swarming/${platform}@git_revision:1120f810b7ab7eb71bd618c4c57fe82a60d4f2fe', + 'v8/tools/swarming_client': 'https://chromium.googlesource.com/infra/luci/client-py.git@a32a1607f6093d338f756c7e7c7b4333b0c50c9c', } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d77c27a..686b8af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,17 +6,41 @@ jobs: strategy: matrix: # TODO: make mode matrix of ['release', 'debug']? - arch: ['arm', 'arm64', 'ia32', 'x64'] - runs-on: ubuntu-latest +# arch: ['arm', 'arm64', 'ia32', 'x64'] + arch: ['arm64'] + runs-on: ubuntu-20.04 + container: + image: python:2.7.18-buster name: ${{ matrix.arch }} env: CCACHE_DIR: ${{ github.workspace }}/.ccache USE_CCACHE: 1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - uses: nttld/setup-ndk@v1 + id: setup-ndk + with: + ndk-version: r16b + add-to-path: true + local-cache: true + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '2.x' # Use the specific version you need + + - name: Install vpython + run: | + python -m pip install --upgrade pip + pip install vpython + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + + - run: echo "ANDROID_SDK=/usr/local/lib/android/sdk" >> $GITHUB_ENV + - run: wget https://github.com/chromium/chromium/raw/master/build/install-build-deps.sh - run: sudo bash ./install-build-deps.sh --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt @@ -33,6 +57,10 @@ jobs: name: Apply DEPS patch working-directory: ./v8 + - run: git apply ../DEPS_2.patch + name: Apply DEPS patch + working-directory: ./v8 + # Apply compatibility patches # NOTE: These also need to be applied in the package step - run: git apply ../compat.patch @@ -56,13 +84,13 @@ jobs: working-directory: ./v8 - name: Checkout depot_tools repo - run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git && cd depot_tools && git -c advice.detachedHead=false checkout b0a190348a740cb063eb98ba6eb9d18ccd573ae7 - name: Add depot_tools to PATH! run: echo "${{ github.workspace }}/depot_tools" >> $GITHUB_PATH - - name: Link Android NDK - run: ln -s /usr/local/lib/android/sdk/ndk-bundle v8/third_party/android_ndk + # - name: Link Android NDK + # run: ln -s ${{ steps.setup-ndk.outputs.ndk-path }}/../ v8/third_party/android_ndk && chmod 777 v8/third_party/android_ndk - run: ../depot_tools/gclient sync --shallow --no-history --reset --force name: Install GClient Dependencies @@ -77,7 +105,7 @@ jobs: ${{ runner.os }}-ccache-${{ matrix.arch }}- ${{ runner.os }}-ccache- - - run: ./build_v8.sh -n /usr/local/lib/android/sdk/ndk-bundle -s /usr/local/lib/android/sdk -l ${{ matrix.arch }} -m release -x v8_monolith + - run: ./build_v8.sh -l ${{ matrix.arch }} -m release -x v8_monolith name: Build - name: Show summary of ccache configuration and statistics counters @@ -96,7 +124,7 @@ jobs: name: Package needs: build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true diff --git a/.gitmodules b/.gitmodules index 0f76e10..a7425a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "v8"] path = v8 - url = git://github.com/v8/v8.git + url = https://github.com/v8/v8.git diff --git a/DEPS_2.patch b/DEPS_2.patch new file mode 100644 index 0000000..335cf61 --- /dev/null +++ b/DEPS_2.patch @@ -0,0 +1,11 @@ +--- v8/DEPS 2022-12-25 19:07:18.396683888 +0100 ++++ v8/DEPS_new 2022-12-26 15:57:09.847886843 +0100 +@@ -279,7 +279,7 @@ + 'dep_type': 'cipd', + }, + 'third_party/requests': { +- 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + '2c2138e811487b13020eb331482fb991fd399d4e', ++ 'url': Var('chromium_url') + '/external/github.com/kennethreitz/requests.git' + '@' + 'refs/tags/v2.23.0', + 'condition': 'checkout_android', + }, + 'third_party/zlib': diff --git a/build_v8.sh b/build_v8.sh index 3a4b3bb..f37ebff 100755 --- a/build_v8.sh +++ b/build_v8.sh @@ -128,9 +128,9 @@ buildV8() cp -f ../overrides/build/toolchain/android/BUILD.gn "$V8_DIR/build/toolchain/android/BUILD.gn" fi # Force building with libc++ from Android NDK - cp -f ../overrides/build/config/android/BUILD.gn "$V8_DIR/build/config/android/BUILD.gn" + cp -fvv ../overrides/build/config/android/BUILD.gn "$V8_DIR/build/config/android/BUILD.gn" # Copy NDK build config - cp -f ../overrides/third_party/android_ndk/BUILD.gn "$V8_DIR/third_party/android_ndk/BUILD.gn" + cp -fvv ../overrides/third_party/android_ndk/BUILD.gn "$V8_DIR/third_party/android_ndk/BUILD.gn" # Build V8 MAKE_TARGET="android_$BUILD_LIB_VERSION.$BUILD_MODE" diff --git a/compat.patch b/compat.patch index 5a8b494..20bc044 100644 --- a/compat.patch +++ b/compat.patch @@ -609,7 +609,8 @@ index 78c454e334..412214da11 100644 // Fast path: If the object is a plain JSObject, which is the common case, we // know where to find the internal fields and can return the value directly. int instance_type = I::GetInstanceType(obj); - if (v8::internal::CanHaveInternalField(instance_type)) { +- if (v8::internal::CanHaveInternalField(instance_type)) { ++ if (instance_type == I::kJSObjectType || instance_type == 0x420 || instance_type == I::kJSSpecialApiObjectType) { int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index); - A value = I::ReadRawField(obj, offset); + O value = I::ReadRawField(obj, offset); @@ -627,6 +628,15 @@ index 78c454e334..412214da11 100644 return Local(reinterpret_cast(result)); } #endif +@@ -11651,7 +11772,7 @@ void* Object::GetAlignedPointerFromInternalField(int index) { + // Fast path: If the object is a plain JSObject, which is the common case, we + // know where to find the internal fields and can return the value directly. + auto instance_type = I::GetInstanceType(obj); +- if (v8::internal::CanHaveInternalField(instance_type)) { ++ if (instance_type == I::kJSObjectType || instance_type == 0x420 || instance_type == I::kJSSpecialApiObjectType) { + int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index); + #ifdef V8_HEAP_SANDBOX + offset += I::kEmbedderDataSlotRawPayloadOffset; @@ -12262,21 +12383,23 @@ Local Context::GetEmbedderData(int index) { #ifndef V8_ENABLE_CHECKS using A = internal::Address; diff --git a/v8 b/v8 index 452f57b..1a12888 160000 --- a/v8 +++ b/v8 @@ -1 +1 @@ -Subproject commit 452f57beb81039de38d5ea831e6ccb5ec79aa0bd +Subproject commit 1a12888bc139b36a9250dd699269acb384f61be1 diff --git a/version.patch b/version.patch index d0a2c42..106c34b 100644 --- a/version.patch +++ b/version.patch @@ -2,6 +2,6 @@ diff --- a/include/v8-version.h +++ b/include/v8-version.h @@ -11,2 +11,2 @@ --#define V8_PATCH_LEVEL 16 -+#define V8_PATCH_LEVEL 16 +-#define V8_PATCH_LEVEL 0 ++#define V8_PATCH_LEVEL 0