1
1
1. Manage dependencies in Bazel. (https://crrev.com/c/3344621)
2
2
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)
7
4
8
5
diff --git a/BUILD.bazel b/BUILD.bazel
9
- index 5d607a5048..d2f3030326 100644
6
+ index 5d607a5048..8a2041a75d 100644
10
7
--- a/BUILD.bazel
11
8
+++ b/BUILD.bazel
12
9
@@ -3,6 +3,8 @@
@@ -208,7 +205,7 @@ index 5d607a5048..d2f3030326 100644
208
205
deps = [
209
206
":v8_libbase",
210
207
- "@zlib",
211
- + "@com_googlesource_chromium_trace_event_common //:trace_event_common",
208
+ + "@com_googlesource_chromium_base_trace_event_common //:trace_event_common",
212
209
+ "@com_googlesource_chromium_zlib//:zlib",
213
210
],
214
211
)
@@ -223,59 +220,31 @@ index 5d607a5048..d2f3030326 100644
223
220
)
224
221
225
222
diff --git a/WORKSPACE b/WORKSPACE
226
- index 289902f68d..c9331b34cf 100644
223
+ index 289902f68d..9cc1f0be95 100644
227
224
--- a/WORKSPACE
228
225
+++ 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(
240
227
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
241
228
bazel_skylib_workspace()
242
229
243
230
- new_local_repository(
244
231
- name = "zlib",
245
232
- path = "third_party/zlib",
246
233
- 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()
260
236
+
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 ",
266
242
)
267
243
268
244
- new_local_repository(
269
245
- name = "icu",
270
246
- path = "third_party/icu",
271
247
- 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
- +
279
248
+ load("@rules_python//python:pip.bzl", "pip_install")
280
249
+
281
250
+ pip_install(
@@ -353,35 +322,22 @@ index 2d5d241ebf..72aae9e270 100644
353
322
if cpu_type in allowed_values:
354
323
return V8CpuTypeInfo(value = cpu_type)
355
324
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
356
- index 14fff6f049..35f0442f6c 100644
325
+ index 088d989b99..7b163a333f 100644
357
326
--- a/bazel/defs.bzl
358
327
+++ b/bazel/defs.bzl
359
- @@ -120,13 +120,17 @@ def _default_args():
328
+ @@ -146,6 +146,11 @@ def _default_args():
329
+ "-O1",
360
330
],
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):
385
341
"arm64-v8a": "arm64",
386
342
"arm": "arm64",
387
343
"armeabi-v7a": "arm32",
@@ -447,6 +403,43 @@ index 9547041c33..0000000000
447
403
- # Copy generated files to bazel output folder
448
404
- cp out/inspector/gen/include/inspector/* $BAZEL_OUT/include/inspector/
449
405
- 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
+ + )
450
443
diff --git a/bazel/requirements.in b/bazel/requirements.in
451
444
new file mode 100644
452
445
index 0000000000..7f7afbf3bf
@@ -542,14 +535,14 @@ index 0000000000..a9c132f688
542
535
+ --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872
543
536
+ # via jinja2
544
537
diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn
545
- index 495354da45..1473f30df0 100644
538
+ index 495354da45..733fab3dff 100644
546
539
--- a/src/inspector/BUILD.gn
547
540
+++ b/src/inspector/BUILD.gn
548
541
@@ -47,6 +47,8 @@ inspector_protocol_generate("protocol_generated_sources") {
549
542
550
543
inspector_protocol_dir = _inspector_protocol
551
544
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)
553
546
+ config_values = [ "protocol.path=$_protocol_path" ]
554
547
config_file = v8_path_prefix + "/src/inspector/inspector_protocol_config.json"
555
548
inputs = [
0 commit comments