11# 1. Disable pointer compression (limits the maximum number of WasmVMs).
22# 2. Don't expose Wasm C API (only Wasm C++ API).
33# 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.
45
56diff --git a/BUILD.bazel b/BUILD.bazel
67index 4e89f90e7e..3fcb38b3f3 100644
@@ -27,6 +28,25 @@ index e957c0fad3..063627b72b 100644
2728 # Use GNU dialect, because GCC doesn't allow using
2829 # ##__VA_ARGS__ when in standards-conforming mode.
2930 "-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({
3050diff --git a/src/wasm/c-api.cc b/src/wasm/c-api.cc
3151index 4473e205c0..65a6ec7e1d 100644
3252--- a/src/wasm/c-api.cc
0 commit comments