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.
34
45diff --git a/BUILD.bazel b/BUILD.bazel
5- index 5fb10d3940..a19930d36e 100644
6+ index 4e89f90e7e..3fcb38b3f3 100644
67--- a/BUILD.bazel
78+++ b/BUILD.bazel
8- @@ -161 ,7 +161 ,7 @@ v8_int(
9+ @@ -157 ,7 +157 ,7 @@ v8_int(
910 # If no explicit value for v8_enable_pointer_compression, we set it to 'none'.
1011 v8_string(
1112 name = "v8_enable_pointer_compression",
@@ -14,11 +15,23 @@ index 5fb10d3940..a19930d36e 100644
1415 )
1516
1617 # Default setting for v8_enable_pointer_compression.
18+ diff --git a/bazel/defs.bzl b/bazel/defs.bzl
19+ index e957c0fad3..063627b72b 100644
20+ --- a/bazel/defs.bzl
21+ +++ b/bazel/defs.bzl
22+ @@ -131,6 +131,7 @@ def _default_args():
23+ "-Wno-redundant-move",
24+ "-Wno-return-type",
25+ "-Wno-stringop-overflow",
26+ + "-Wno-nonnull",
27+ # Use GNU dialect, because GCC doesn't allow using
28+ # ##__VA_ARGS__ when in standards-conforming mode.
29+ "-std=gnu++17",
1730diff --git a/src/wasm/c-api.cc b/src/wasm/c-api.cc
18- index ce3f569fd5..dc8a4c4f6a 100644
31+ index 4473e205c0..65a6ec7e1d 100644
1932--- a/src/wasm/c-api.cc
2033+++ b/src/wasm/c-api.cc
21- @@ -2238 ,6 +2238 ,8 @@ auto Instance::exports() const -> ownvec<Extern> {
34+ @@ -2247 ,6 +2247 ,8 @@ auto Instance::exports() const -> ownvec<Extern> {
2235
2336 } // namespace wasm
2437
@@ -27,7 +40,7 @@ index ce3f569fd5..dc8a4c4f6a 100644
2740 // BEGIN FILE wasm-c.cc
2841
2942 extern "C" {
30- @@ -3257 ,3 +3259 ,5 @@ wasm_instance_t* wasm_frame_instance(const wasm_frame_t* frame) {
43+ @@ -3274 ,3 +3276 ,5 @@ wasm_instance_t* wasm_frame_instance(const wasm_frame_t* frame) {
3144 #undef WASM_DEFINE_SHARABLE_REF
3245
3346 } // extern "C"
0 commit comments