11# 1. Disable pointer compression (limits the maximum number of WasmVMs).
22# 2. Don't expose Wasm C API (only Wasm C++ API).
3- # 3. Fix gcc build error by disabling nonnull warning.
4- # 4. Allow compiling v8 on macOS 10.15 to 13.0. TODO(dio): Will remove this patch when https://bugs.chromium.org/p/v8/issues/detail?id=13428 is fixed.
3+ # 3. Revert v8 commit b26554ec368e9553782012c96aa5e99b163eaff2, which removed
4+ # use of _allowlist_function_transition from v8 bazel/defs.bzl, since it is
5+ # still required by the version of Bazel we currently use (6.5.0).
56
67diff --git a/BUILD.bazel b/BUILD.bazel
7- index 4e89f90e7e..3fcb38b3f3 100644
8+ index 3f5a87d054e..0a693b7ee10 100644
89--- a/BUILD.bazel
910+++ b/BUILD.bazel
10- @@ -157 ,7 +157 ,7 @@ v8_int(
11+ @@ -292 ,7 +292 ,7 @@ v8_int(
1112 # If no explicit value for v8_enable_pointer_compression, we set it to 'none'.
1213 v8_string(
1314 name = "v8_enable_pointer_compression",
@@ -16,42 +17,11 @@ index 4e89f90e7e..3fcb38b3f3 100644
1617 )
1718
1819 # Default setting for v8_enable_pointer_compression.
19- diff --git a/bazel/defs.bzl b/bazel/defs.bzl
20- index e957c0fad3..063627b72b 100644
21- --- a/bazel/defs.bzl
22- +++ b/bazel/defs.bzl
23- @@ -131,6 +131,7 @@ def _default_args():
24- "-Wno-redundant-move",
25- "-Wno-return-type",
26- "-Wno-stringop-overflow",
27- + "-Wno-nonnull",
28- # Use GNU dialect, because GCC doesn't allow using
29- # ##__VA_ARGS__ when in standards-conforming mode.
30- "-std=gnu++17",
31- @@ -151,6 +152,18 @@ def _default_args():
32- "-fno-integrated-as",
33- ],
34- "//conditions:default": [],
35- + }) + select({
36- + "@v8//bazel/config:is_macos": [
37- + # The clang available on macOS catalina has a warning that isn't clean on v8 code.
38- + "-Wno-range-loop-analysis",
39- +
40- + # To supress warning on deprecated declaration on v8 code. For example:
41- + # external/v8/src/base/platform/platform-darwin.cc:56:22: 'getsectdatafromheader_64'
42- + # is deprecated: first deprecated in macOS 13.0.
43- + # https://bugs.chromium.org/p/v8/issues/detail?id=13428.
44- + "-Wno-deprecated-declarations",
45- + ],
46- + "//conditions:default": [],
47- }),
48- includes = ["include"],
49- linkopts = select({
5020diff --git a/src/wasm/c-api.cc b/src/wasm/c-api.cc
51- index 4473e205c0..65a6ec7e1d 100644
21+ index 05e4029f183..d705be96a16 100644
5222--- a/src/wasm/c-api.cc
5323+++ b/src/wasm/c-api.cc
54- @@ -2247 ,6 +2247 ,8 @@ auto Instance::exports() const -> ownvec<Extern> {
24+ @@ -2472 ,6 +2472 ,8 @@ WASM_EXPORT auto Instance::exports() const -> ownvec<Extern> {
5525
5626 } // namespace wasm
5727
@@ -60,7 +30,7 @@ index 4473e205c0..65a6ec7e1d 100644
6030 // BEGIN FILE wasm-c.cc
6131
6232 extern "C" {
63- @@ -3274 ,3 +3276 ,5 @@ wasm_instance_t* wasm_frame_instance(const wasm_frame_t* frame) {
33+ @@ -3518 ,3 +3520 ,5 @@ wasm_instance_t* wasm_frame_instance(const wasm_frame_t* frame) {
6434 #undef WASM_DEFINE_SHARABLE_REF
6535
6636 } // extern "C"
0 commit comments