forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
v8.patch
105 lines (96 loc) · 3.6 KB
/
v8.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# 1. Use already imported python dependencies
# 2. Disable pointer compression (limits the maximum number of WasmVMs).
# 3. Add support for --define=no_debug_info=1.
# 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.
# 5. Don't expose Wasm C API (only Wasm C++ API).
diff --git a/BUILD.bazel b/BUILD.bazel
index 4e89f90..0df4f67 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -4,7 +4,7 @@
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@rules_python//python:defs.bzl", "py_binary")
-load("@v8_python_deps//:requirements.bzl", "requirement")
+load("@base_pip3//:requirements.bzl", "requirement")
load(
"@v8//:bazel/defs.bzl",
"v8_binary",
@@ -157,7 +157,7 @@ v8_int(
# If no explicit value for v8_enable_pointer_compression, we set it to 'none'.
v8_string(
name = "v8_enable_pointer_compression",
- default = "none",
+ default = "False",
)
# Default setting for v8_enable_pointer_compression.
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
index e957c0f..0327669 100644
--- a/bazel/defs.bzl
+++ b/bazel/defs.bzl
@@ -116,6 +116,7 @@ def _default_args():
}) + select({
"@v8//bazel/config:is_clang": [
"-Wno-invalid-offsetof",
+ "-Wno-unneeded-internal-declaration",
"-std=c++17",
],
"@v8//bazel/config:is_gcc": [
@@ -131,6 +132,8 @@ def _default_args():
"-Wno-redundant-move",
"-Wno-return-type",
"-Wno-stringop-overflow",
+ "-Wno-nonnull",
+ "-Wno-pessimizing-move",
# Use GNU dialect, because GCC doesn't allow using
# ##__VA_ARGS__ when in standards-conforming mode.
"-std=gnu++17",
@@ -151,6 +154,23 @@ def _default_args():
"-fno-integrated-as",
],
"//conditions:default": [],
+ }) + select({
+ "@envoy//bazel:no_debug_info": [
+ "-g0",
+ ],
+ "//conditions:default": [],
+ }) + select({
+ "@v8//bazel/config:is_macos": [
+ # The clang available on macOS catalina has a warning that isn't clean on v8 code.
+ "-Wno-range-loop-analysis",
+
+ # To supress warning on deprecated declaration on v8 code. For example:
+ # external/v8/src/base/platform/platform-darwin.cc:56:22: 'getsectdatafromheader_64'
+ # is deprecated: first deprecated in macOS 13.0.
+ # https://bugs.chromium.org/p/v8/issues/detail?id=13428.
+ "-Wno-deprecated-declarations",
+ ],
+ "//conditions:default": [],
}),
includes = ["include"],
linkopts = select({
diff --git a/src/wasm/c-api.cc b/src/wasm/c-api.cc
index 4473e20..65a6ec7 100644
--- a/src/wasm/c-api.cc
+++ b/src/wasm/c-api.cc
@@ -2247,6 +2247,8 @@ auto Instance::exports() const -> ownvec<Extern> {
} // namespace wasm
+#if 0
+
// BEGIN FILE wasm-c.cc
extern "C" {
@@ -3274,3 +3276,5 @@ wasm_instance_t* wasm_frame_instance(const wasm_frame_t* frame) {
#undef WASM_DEFINE_SHARABLE_REF
} // extern "C"
+
+#endif
diff --git a/third_party/inspector_protocol/code_generator.py b/third_party/inspector_protocol/code_generator.py
index c3768b8..d4a1dda 100755
--- a/third_party/inspector_protocol/code_generator.py
+++ b/third_party/inspector_protocol/code_generator.py
@@ -16,6 +16,8 @@ try:
except ImportError:
import simplejson as json
+sys.path += [os.path.dirname(__file__)]
+
import pdl
try: