From 98cfac8ad181a5a1311c3f9547a2acbc30ed4f96 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 20 May 2021 00:54:36 -0700 Subject: [PATCH] wasm: update V8 to v9.2.230.2. Signed-off-by: Piotr Sikora --- bazel/external/wee8.genrule_cmd | 2 +- bazel/external/wee8.patch | 30 ++++++++---------------------- bazel/repository_locations.bzl | 6 +++--- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/bazel/external/wee8.genrule_cmd b/bazel/external/wee8.genrule_cmd index 11fb9c6ed8d9a..7d2a9d017e8bc 100644 --- a/bazel/external/wee8.genrule_cmd +++ b/bazel/external/wee8.genrule_cmd @@ -33,7 +33,7 @@ if [[ ( $${SYSTEM} == "Darwin" && $${CXX-} == "" ) || $${CXX-} == *clang* ]]; th export IS_CLANG=true export CC=$${CC:-clang} export CXX=$${CXX:-clang++} - export CXXFLAGS="$${CXXFLAGS} -Wno-implicit-int-float-conversion -Wno-builtin-assume-aligned-alignment -Wno-final-dtor-non-final-class" + export CXXFLAGS="$${CXXFLAGS} -Wno-implicit-int-float-conversion -Wno-builtin-assume-aligned-alignment -Wno-final-dtor-non-final-class -Wno-invalid-constexpr" else export IS_CLANG=false export CC=$${CC:-gcc} diff --git a/bazel/external/wee8.patch b/bazel/external/wee8.patch index 6a25320fa147b..5dfce7b799e11 100644 --- a/bazel/external/wee8.patch +++ b/bazel/external/wee8.patch @@ -1,9 +1,9 @@ # 1. Fix linking with unbundled toolchain on macOS. # 2. Increase VSZ limit to 64 TiB (allows us to start up to 6,553 VMs). -# 3. Fix building and linking with MSAN. +# 3. Fix linking with MSAN. --- wee8/build/toolchain/gcc_toolchain.gni +++ wee8/build/toolchain/gcc_toolchain.gni -@@ -348,6 +348,8 @@ template("gcc_toolchain") { +@@ -376,6 +376,8 @@ template("gcc_toolchain") { # AIX does not support either -D (deterministic output) or response # files. command = "$ar -X64 {{arflags}} -r -c -s {{output}} {{inputs}}" @@ -12,7 +12,7 @@ } else { rspfile = "{{output}}.rsp" rspfile_content = "{{inputs}}" -@@ -543,7 +545,7 @@ template("gcc_toolchain") { +@@ -565,7 +567,7 @@ template("gcc_toolchain") { start_group_flag = "" end_group_flag = "" @@ -23,9 +23,9 @@ end_group_flag = "-Wl,--end-group " --- wee8/src/objects/backing-store.cc +++ wee8/src/objects/backing-store.cc -@@ -34,7 +34,7 @@ constexpr bool kUseGuardRegions = false; - // address space limits needs to be smaller. - constexpr size_t kAddressSpaceLimit = 0x8000000000L; // 512 GiB +@@ -53,7 +53,7 @@ constexpr size_t kAddressSpaceLimit = 0x8000000000L; // 512 GiB + // RISC-V64 has a user space of 256GB on the Sv39 scheme. + constexpr size_t kAddressSpaceLimit = 0x4000000000L; // 256 GiB #elif V8_TARGET_ARCH_64_BIT -constexpr size_t kAddressSpaceLimit = 0x10100000000L; // 1 TiB + 4 GiB +constexpr size_t kAddressSpaceLimit = 0x400100000000L; // 64 TiB + 4 GiB @@ -34,7 +34,7 @@ #endif --- wee8/build/config/sanitizers/sanitizers.gni +++ wee8/build/config/sanitizers/sanitizers.gni -@@ -150,7 +150,7 @@ if (!is_a_target_toolchain) { +@@ -153,7 +153,7 @@ if (!is_a_target_toolchain) { # standard system libraries. We have instrumented system libraries for msan, # which requires them to prevent false positives. # TODO(thakis): Maybe remove this variable. @@ -43,7 +43,7 @@ # Whether we are doing a fuzzer build. Normally this should be checked instead # of checking "use_libfuzzer || use_afl" because often developers forget to -@@ -198,8 +198,7 @@ assert(!using_sanitizer || is_clang, +@@ -202,8 +202,7 @@ assert(!using_sanitizer || is_clang, assert(!is_cfi || is_clang, "is_cfi requires setting is_clang = true in 'gn args'") @@ -53,17 +53,3 @@ if (use_libfuzzer && (is_linux || is_chromeos)) { if (is_asan) { ---- wee8/build/config/compiler/BUILD.gn -+++ wee8/build/config/compiler/BUILD.gn -@@ -736,11 +736,6 @@ config("compiler") { - cflags += [ "-fcomplete-member-pointers" ] - } - -- # TODO(crbug/1185183): Remove after next clang roll -- if (is_clang && !is_nacl && is_linux && is_msan) { -- cflags += [ "-flegacy-pass-manager" ] -- } -- - # Pass the same C/C++ flags to the objective C/C++ compiler. - cflags_objc += cflags_c - cflags_objcc += cflags_cc diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index bd88f5b04890d..106d7a1799184 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -768,14 +768,14 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "V8", project_desc = "Google’s open source high-performance JavaScript and WebAssembly engine, written in C++", project_url = "https://v8.dev", - version = "9.1.269.18", + version = "9.2.230.2", # This archive was created using https://storage.googleapis.com/envoyproxy-wee8/wee8-archive.sh # and contains complete checkout of V8 with all dependencies necessary to build wee8. - sha256 = "3c4f0827f38b49c11a8a3a20cf897ce14dc8a7a7b999f8b0ee913211c6ab3d8b", + sha256 = "237b9816ee56ad9b86e12e082132d88c543be494385f9bf9797af2a415c05f56", urls = ["https://storage.googleapis.com/envoyproxy-wee8/wee8-{version}.tar.gz"], use_category = ["dataplane_ext"], extensions = ["envoy.wasm.runtime.v8"], - release_date = "2021-04-27", + release_date = "2021-05-20", cpe = "cpe:2.3:a:google:v8:*", ), com_googlesource_quiche = dict(