forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv8.patch
More file actions
204 lines (194 loc) · 7.76 KB
/
v8.patch
File metadata and controls
204 lines (194 loc) · 7.76 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
diff --git a/BUILD.bazel b/BUILD.bazel
index 85f31b7a..eeba8efa 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -6,7 +6,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
load("@rules_python//python:defs.bzl", "py_binary", "py_test")
-load("@v8_python_deps//:requirements.bzl", "requirement")
+load("@base_pip3//:requirements.bzl", "requirement")
load(
"@v8//:bazel/defs.bzl",
"v8_binary",
@@ -303,7 +303,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.
@@ -4607,10 +4607,10 @@ v8_library(
":noicu/generated_torque_definitions",
],
deps = [
- ":lib_dragonbox",
- "//third_party/fast_float/src:fast_float",
- ":lib_fp16",
- ":simdutf",
+ "@dragonbox//:dragonbox",
+ "@fast_float//:fast_float",
+ "@fp16//:FP16",
+ "@simdutf//:simdutf",
":v8_libbase",
"@abseil-cpp//absl/container:btree",
"@abseil-cpp//absl/container:flat_hash_map",
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
index 9648e4a5..75102917 100644
--- a/bazel/defs.bzl
+++ b/bazel/defs.bzl
@@ -98,7 +98,7 @@ def _default_args():
def _default_args():
return struct(
- deps = [":define_flags", "@libcxx//:libc++"],
+ deps = [":define_flags"],
defines = select({
"@v8//bazel/config:is_windows": [
"UNICODE",
@@ -112,8 +112,7 @@ def _default_args():
"-fPIC",
"-fno-strict-aliasing",
- "-fconstexpr-steps=2000000",
- "-Werror",
+ "-Wno-error", # Envoy build should not fail for warnings in dependencies
"-Wextra",
"-Wno-unneeded-internal-declaration",
"-Wno-unknown-warning-option", # b/330781959
@@ -123,6 +122,9 @@ def _default_args():
"-Wno-implicit-int-float-conversion",
"-Wno-deprecated-copy",
"-Wno-non-virtual-dtor",
+ "-Wno-invalid-offsetof",
+ "-Wno-dangling-pointer",
+ "-Wno-dangling-reference",
"-Wno-unnecessary-virtual-specifier",
"-isystem .",
],
@@ -133,6 +135,8 @@ def _default_args():
"@v8//bazel/config:is_clang": [
"-Wno-invalid-offsetof",
+ # -fconstexpr-steps is clang-only; moved here from is_posix block.
+ "-fconstexpr-steps=2000000",
"-Wno-deprecated-this-capture",
"-Wno-deprecated-declarations",
"-std=c++20",
@@ -148,6 +152,9 @@ def _default_args():
"-Wno-return-type",
"-Wno-stringop-overflow",
"-Wno-deprecated-this-capture",
+ "-Wno-error", # Envoy build should not fail for warnings in dependencies
+ "-Wno-unused-variable",
+ "-flax-vector-conversions", # for GCC builds on ARM
# Use GNU dialect, because GCC doesn't allow using
# ##__VA_ARGS__ when in standards-conforming mode.
"-std=gnu++2a",
@@ -184,10 +192,27 @@ def _default_args():
"Advapi32.lib",
],
"@v8//bazel/config:is_macos": ["-pthread"],
- "//conditions:default": ["-Wl,--no-as-needed -ldl -latomic -pthread"],
+ "//conditions:default": ["-Wl,--no-as-needed -ldl -pthread"],
}) + select({
":should_add_rdynamic": ["-rdynamic"],
"//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": [],
}),
)
diff --git a/src/common/globals.h b/src/common/globals.h
--- a/src/common/globals.h
+++ b/src/common/globals.h
@@ -578,7 +578,7 @@ static const char* kPointerTableAddressSpaceName = "v8-pointer-table";
// virtual memory ranges (PR_SET_VMA_ANON_NAME on Linux).
// TODO(saelo): It might be nicer to have one name per table type, e.g.
// v8-external-pointer-table, v8-trusted-pointer-table, etc.
-static const char* kPointerTableAddressSpaceName = "v8-pointer-table";
+[[maybe_unused]] static const char* kPointerTableAddressSpaceName = "v8-pointer-table";
//
// JavaScript Dispatch Table
diff --git a/src/compiler/turboshaft/wasm-shuffle-reducer.cc b/src/compiler/turboshaft/wasm-shuffle-reducer.cc
--- a/src/compiler/turboshaft/wasm-shuffle-reducer.cc
+++ b/src/compiler/turboshaft/wasm-shuffle-reducer.cc
@@ -461,7 +461,9 @@ void WasmShuffleAnalyzer::ProcessI8x16Shuffle(const OpIndex node) {
if (!DemandedByteLanes(&shuffle)) {
// Full width shuffles.
- wasm::SimdShuffle::ShuffleArray shuffle_bytes;
+ // TODO(jwendell): Remove <> workaround once LLVM toolchain is bumped (clang 18
+ // doesn't support default template args on alias templates without <>).
+ wasm::SimdShuffle::ShuffleArray<> shuffle_bytes;
std::copy_n(shuffle.shuffle, kSimd128Size, shuffle_bytes.begin());
auto canonical = wasm::SimdShuffle::TryMatchCanonical(shuffle_bytes);
switch (canonical) {
diff --git a/src/wasm/c-api.cc b/src/wasm/c-api.cc
index 78e62abb..d7edf951 100644
--- a/src/wasm/c-api.cc
+++ b/src/wasm/c-api.cc
@@ -2482,6 +2482,8 @@ WASM_EXPORT auto Instance::exports() const -> ownvec<Extern> {
} // namespace wasm
+#if 0
+
// BEGIN FILE wasm-c.cc
extern "C" {
@@ -3528,3 +3530,5 @@ wasm_instance_t* wasm_frame_instance(const wasm_frame_t* frame) {
#undef WASM_DEFINE_SHARABLE_REF
} // extern "C"
+
+#endif
diff --git a/src/objects/objects-inl.h b/src/objects/objects-inl.h
--- a/src/objects/objects-inl.h
+++ b/src/objects/objects-inl.h
@@ -1618,11 +1618,13 @@
#ifndef V8_DISABLE_WRITE_BARRIERS
if (emit_write_barrier == EmitWriteBarrier::kYes) {
WriteBarrier::ForValue(*this, MaybeObjectSlot(map_slot()), value,
UPDATE_WRITE_BARRIER);
} else {
DCHECK_EQ(emit_write_barrier, EmitWriteBarrier::kNo);
+#if V8_VERIFY_WRITE_BARRIERS
DCHECK(!WriteBarrier::IsRequired(*this, value));
+#endif
}
#endif
}
@@ -1641,10 +1643,12 @@
#ifndef V8_DISABLE_WRITE_BARRIERS
if (mode != SKIP_WRITE_BARRIER) {
DCHECK(!value.is_null());
WriteBarrier::ForValue(*this, MaybeObjectSlot(map_slot()), value, mode);
} else {
+#if V8_VERIFY_WRITE_BARRIERS
SLOW_DCHECK(
// We allow writes of a null map before root initialisation.
value.is_null() ? !isolate->read_only_heap()->roots_init_complete()
: !WriteBarrier::IsRequired(*this, value));
+#endif
}
#endif
}
diff --git a/third_party/inspector_protocol/code_generator.py b/third_party/inspector_protocol/code_generator.py
index 49952dda..268af813 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: