Skip to content

Commit 7ae0505

Browse files
committed
review: update V8 to v9.9.67 and regenerate patches.
Signed-off-by: Piotr Sikora <[email protected]>
1 parent 09051db commit 7ae0505

File tree

2 files changed

+67
-74
lines changed

2 files changed

+67
-74
lines changed

bazel/external/v8.patch

Lines changed: 64 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
1. Manage dependencies in Bazel. (https://crrev.com/c/3344621)
22
2. Generate inspector files using @rules_python. (https://crrev.com/c/3343881)
3-
3. Fix build with older versions of GCC. (https://crrev.com/c/3368869)
4-
4. Fix build on arm64. (https://crrev.com/c/3368870)
5-
5. Fix build on Windows. (https://crrev.com/c/3368871)
6-
6. Add support for building on s390x. (https://crrev.com/c/3346395)
3+
3. Add support for building on s390x. (https://crrev.com/c/3346395)
74

85
diff --git a/BUILD.bazel b/BUILD.bazel
9-
index 5d607a5048..d2f3030326 100644
6+
index 5d607a5048..8a2041a75d 100644
107
--- a/BUILD.bazel
118
+++ b/BUILD.bazel
129
@@ -3,6 +3,8 @@
@@ -208,7 +205,7 @@ index 5d607a5048..d2f3030326 100644
208205
deps = [
209206
":v8_libbase",
210207
- "@zlib",
211-
+ "@com_googlesource_chromium_trace_event_common//:trace_event_common",
208+
+ "@com_googlesource_chromium_base_trace_event_common//:trace_event_common",
212209
+ "@com_googlesource_chromium_zlib//:zlib",
213210
],
214211
)
@@ -223,59 +220,31 @@ index 5d607a5048..d2f3030326 100644
223220
)
224221

225222
diff --git a/WORKSPACE b/WORKSPACE
226-
index 289902f68d..c9331b34cf 100644
223+
index 289902f68d..9cc1f0be95 100644
227224
--- a/WORKSPACE
228225
+++ b/WORKSPACE
229-
@@ -4,7 +4,9 @@
230-
231-
workspace(name = "v8")
232-
233-
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
234-
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
235-
+
236-
http_archive(
237-
name = "bazel_skylib",
238-
urls = [
239-
@@ -16,14 +18,38 @@ http_archive(
226+
@@ -16,14 +16,20 @@ http_archive(
240227
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
241228
bazel_skylib_workspace()
242229

243230
-new_local_repository(
244231
- name = "zlib",
245232
- path = "third_party/zlib",
246233
- build_file = "bazel/BUILD.zlib",
247-
+new_git_repository(
248-
+ name = "com_googlesource_chromium_icu",
249-
+ build_file = "//:bazel/BUILD.icu",
250-
+ commit = "fbc6faf1c2c429cd27fabe615a89f0b217aa4213",
251-
+ remote = "https://chromium.googlesource.com/chromium/deps/icu.git",
252-
+)
253-
+
254-
+new_git_repository(
255-
+ name = "com_googlesource_chromium_trace_event_common",
256-
+ build_file = "//:bazel/BUILD.trace_event_common",
257-
+ commit = "7f36dbc19d31e2aad895c60261ca8f726442bfbb",
258-
+ remote = "https://chromium.googlesource.com/chromium/src/base/trace_event/common.git",
259-
+)
234+
+load("@v8//:bazel/repositories.bzl", "v8_repositories")
235+
+v8_repositories()
260236
+
261-
+new_git_repository(
262-
+ name = "com_googlesource_chromium_zlib",
263-
+ build_file = "//:bazel/BUILD.zlib",
264-
+ commit = "efd9399ae01364926be2a38946127fdf463480db",
265-
+ remote = "https://chromium.googlesource.com/chromium/src/third_party/zlib.git",
237+
+http_archive(
238+
+ name = "rules_python",
239+
+ sha256 = "a30abdfc7126d497a7698c29c46ea9901c6392d6ed315171a6df5ce433aa4502",
240+
+ strip_prefix = "rules_python-0.6.0",
241+
+ url = "https://github.com/bazelbuild/rules_python/archive/0.6.0.tar.gz",
266242
)
267243

268244
-new_local_repository(
269245
- name = "icu",
270246
- path = "third_party/icu",
271247
- build_file = "bazel/BUILD.icu",
272-
+http_archive(
273-
+ name = "rules_python",
274-
+ sha256 = "a30abdfc7126d497a7698c29c46ea9901c6392d6ed315171a6df5ce433aa4502",
275-
+ strip_prefix = "rules_python-0.6.0",
276-
+ url = "https://github.com/bazelbuild/rules_python/archive/0.6.0.tar.gz",
277-
+)
278-
+
279248
+load("@rules_python//python:pip.bzl", "pip_install")
280249
+
281250
+pip_install(
@@ -353,35 +322,22 @@ index 2d5d241ebf..72aae9e270 100644
353322
if cpu_type in allowed_values:
354323
return V8CpuTypeInfo(value = cpu_type)
355324
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
356-
index 14fff6f049..35f0442f6c 100644
325+
index 088d989b99..7b163a333f 100644
357326
--- a/bazel/defs.bzl
358327
+++ b/bazel/defs.bzl
359-
@@ -120,13 +120,17 @@ def _default_args():
328+
@@ -146,6 +146,11 @@ def _default_args():
329+
"-O1",
360330
],
361-
"@v8//bazel/config:is_gcc": [
362-
"-Wno-extra",
363-
+ "-Wno-array-bounds",
364-
+ "-Wno-class-memaccess",
365-
"-Wno-comments",
366-
"-Wno-deprecated-declarations",
367-
"-Wno-implicit-fallthrough",
368-
+ "-Wno-int-in-bool-context",
369-
"-Wno-maybe-uninitialized",
370-
"-Wno-mismatched-new-delete",
371-
"-Wno-redundant-move",
372-
"-Wno-return-type",
373-
+ "-Wno-stringop-overflow",
374-
# Use GNU dialect, because GCC doesn't allow using
375-
# ##__VA_ARGS__ when in standards-conforming mode.
376-
"-std=gnu++17",
377-
@@ -367,11 +371,14 @@ def _v8_target_cpu_transition_impl(settings, attr):
378-
"x86_64": "x64",
379-
"darwin": "x64",
380-
"darwin_x86_64": "x64",
381-
+ "x64_windows": "x64",
382-
"x86": "ia32",
383-
"ppc": "ppc64",
384-
+ "aarch64": "arm64",
331+
"//conditions:default": [],
332+
+ }) + select({
333+
+ "@v8//bazel/config:is_s390x": [
334+
+ "-fno-integrated-as",
335+
+ ],
336+
+ "//conditions:default": [],
337+
}),
338+
includes = ["include"],
339+
linkopts = select({
340+
@@ -378,6 +383,7 @@ def _v8_target_cpu_transition_impl(settings, attr):
385341
"arm64-v8a": "arm64",
386342
"arm": "arm64",
387343
"armeabi-v7a": "arm32",
@@ -447,6 +403,43 @@ index 9547041c33..0000000000
447403
-# Copy generated files to bazel output folder
448404
-cp out/inspector/gen/include/inspector/* $BAZEL_OUT/include/inspector/
449405
-cp out/inspector/gen/src/inspector/protocol/* $BAZEL_OUT/src/inspector/protocol/
406+
diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl
407+
new file mode 100644
408+
index 0000000000..5a9242a090
409+
--- /dev/null
410+
+++ b/bazel/repositories.bzl
411+
@@ -0,0 +1,31 @@
412+
+# Copyright 2021 the V8 project authors. All rights reserved.
413+
+# Use of this source code is governed by a BSD-style license that can be
414+
+# found in the LICENSE file.
415+
+
416+
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
417+
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
418+
+
419+
+def v8_repositories():
420+
+ maybe(
421+
+ new_git_repository,
422+
+ name = "com_googlesource_chromium_base_trace_event_common",
423+
+ build_file = "@v8//:bazel/BUILD.trace_event_common",
424+
+ commit = "7f36dbc19d31e2aad895c60261ca8f726442bfbb",
425+
+ remote = "https://chromium.googlesource.com/chromium/src/base/trace_event/common.git",
426+
+ )
427+
+
428+
+ maybe(
429+
+ new_git_repository,
430+
+ name = "com_googlesource_chromium_icu",
431+
+ build_file = "@v8//:bazel/BUILD.icu",
432+
+ commit = "fbc6faf1c2c429cd27fabe615a89f0b217aa4213",
433+
+ remote = "https://chromium.googlesource.com/chromium/deps/icu.git",
434+
+ )
435+
+
436+
+ maybe(
437+
+ new_git_repository,
438+
+ name = "com_googlesource_chromium_zlib",
439+
+ build_file = "@v8//:bazel/BUILD.zlib",
440+
+ commit = "efd9399ae01364926be2a38946127fdf463480db",
441+
+ remote = "https://chromium.googlesource.com/chromium/src/third_party/zlib.git",
442+
+ )
450443
diff --git a/bazel/requirements.in b/bazel/requirements.in
451444
new file mode 100644
452445
index 0000000000..7f7afbf3bf
@@ -542,14 +535,14 @@ index 0000000000..a9c132f688
542535
+ --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872
543536
+ # via jinja2
544537
diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn
545-
index 495354da45..1473f30df0 100644
538+
index 495354da45..733fab3dff 100644
546539
--- a/src/inspector/BUILD.gn
547540
+++ b/src/inspector/BUILD.gn
548541
@@ -47,6 +47,8 @@ inspector_protocol_generate("protocol_generated_sources") {
549542

550543
inspector_protocol_dir = _inspector_protocol
551544
out_dir = target_gen_dir
552-
+ _protocol_path=rebase_path(v8_inspector_js_protocol, root_build_dir)
545+
+ _protocol_path = rebase_path(v8_inspector_js_protocol, root_build_dir)
553546
+ config_values = [ "protocol.path=$_protocol_path" ]
554547
config_file = v8_path_prefix + "/src/inspector/inspector_protocol_config.json"
555548
inputs = [

bazel/repositories.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ def proxy_wasm_cpp_host_repositories():
125125

126126
git_repository(
127127
name = "v8",
128-
commit = "3ac58d694cdcdc2a6e1420c06a955f64310c42f8",
128+
commit = "8280a12b2bdf7c22235d44f27998d6de3b47a3bd",
129129
remote = "https://chromium.googlesource.com/v8/v8",
130-
shallow_since = "1641210631 +0000",
130+
shallow_since = "1641557155 +0000",
131131
patches = ["@proxy_wasm_cpp_host//bazel/external:v8.patch"],
132132
patch_args = ["-p1"],
133133
)
134134

135135
new_git_repository(
136-
name = "com_googlesource_chromium_trace_event_common",
136+
name = "com_googlesource_chromium_base_trace_event_common",
137137
build_file = "@v8//:bazel/BUILD.trace_event_common",
138138
commit = "7f36dbc19d31e2aad895c60261ca8f726442bfbb",
139139
remote = "https://chromium.googlesource.com/chromium/src/base/trace_event/common.git",

0 commit comments

Comments
 (0)