[bazel] Don't use source files from external dependencies.

This allows other Bazel projects to fetch those dependencies
without relying on a full "gclient" checkout.

Added "com_googlesource_chromium" prefix to repository names to
indicate that those are Chromium forks and not official releases.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Change-Id: I87272c3e8c28d14d8974cea144e457713c59d994
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3375478
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78550}
This commit is contained in:
Piotr Sikora 2022-01-10 06:37:59 -08:00 committed by V8 LUCI CQ
parent 747cdba92b
commit 12bb012592
3 changed files with 22 additions and 12 deletions

View File

@ -658,7 +658,6 @@ filegroup(
filegroup( filegroup(
name = "v8_libplatform_files", name = "v8_libplatform_files",
srcs = [ srcs = [
"base/trace_event/common/trace_event_common.h",
"include/libplatform/libplatform.h", "include/libplatform/libplatform.h",
"include/libplatform/libplatform-export.h", "include/libplatform/libplatform-export.h",
"include/libplatform/v8-tracing.h", "include/libplatform/v8-tracing.h",
@ -986,7 +985,6 @@ filegroup(
":v8_cppgc_shared_files", ":v8_cppgc_shared_files",
":v8_bigint", ":v8_bigint",
":generated_bytecode_builtins_list", ":generated_bytecode_builtins_list",
"base/trace_event/common/trace_event_common.h",
"include/cppgc/common.h", "include/cppgc/common.h",
"include/v8-inspector-protocol.h", "include/v8-inspector-protocol.h",
"include/v8-inspector.h", "include/v8-inspector.h",
@ -1971,8 +1969,6 @@ filegroup(
"src/snapshot/shared-heap-serializer.cc", "src/snapshot/shared-heap-serializer.cc",
"src/snapshot/snapshot-compression.cc", "src/snapshot/snapshot-compression.cc",
"src/snapshot/snapshot-compression.h", "src/snapshot/snapshot-compression.h",
"third_party/zlib/google/compression_utils_portable.h",
"third_party/zlib/google/compression_utils_portable.cc",
"src/snapshot/snapshot-data.cc", "src/snapshot/snapshot-data.cc",
"src/snapshot/snapshot-data.h", "src/snapshot/snapshot-data.h",
"src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-source-sink.cc",
@ -2319,9 +2315,6 @@ filegroup(
"src/trap-handler/handler-inside-win.cc", "src/trap-handler/handler-inside-win.cc",
"src/trap-handler/handler-outside-win.cc", "src/trap-handler/handler-outside-win.cc",
"src/trap-handler/handler-inside-win.h", "src/trap-handler/handler-inside-win.h",
# Needed on windows to work around https://github.com/bazelbuild/bazel/issues/6337
"third_party/zlib/zlib.h",
"third_party/zlib/zconf.h",
], ],
"//conditions:default": [], "//conditions:default": [],
}) + select({ }) + select({
@ -3373,7 +3366,7 @@ v8_library(
], ],
icu_deps = [ icu_deps = [
":icu/generated_torque_headers", ":icu/generated_torque_headers",
"@icu", "@com_googlesource_chromium_icu//:icu",
], ],
icu_srcs = [ icu_srcs = [
":generated_regexp_special_case", ":generated_regexp_special_case",
@ -3388,7 +3381,8 @@ v8_library(
], ],
deps = [ deps = [
":v8_libbase", ":v8_libbase",
"@zlib", "@com_googlesource_chromium_base_trace_event_common//:trace_event_common",
"@com_googlesource_chromium_zlib//:zlib",
], ],
) )
@ -3456,7 +3450,7 @@ v8_binary(
"UNISTR_FROM_CHAR_EXPLICIT=", "UNISTR_FROM_CHAR_EXPLICIT=",
], ],
deps = [ deps = [
"@icu", "@com_googlesource_chromium_icu//:icu",
], ],
) )

View File

@ -32,13 +32,19 @@ pip_install(
) )
new_local_repository( new_local_repository(
name = "zlib", name = "com_googlesource_chromium_zlib",
path = "third_party/zlib", path = "third_party/zlib",
build_file = "bazel/BUILD.zlib", build_file = "bazel/BUILD.zlib",
) )
new_local_repository( new_local_repository(
name = "icu", name = "com_googlesource_chromium_icu",
path = "third_party/icu", path = "third_party/icu",
build_file = "bazel/BUILD.icu", build_file = "bazel/BUILD.icu",
) )
new_local_repository(
name = "com_googlesource_chromium_base_trace_event_common",
path = "base/trace_event/common",
build_file = "bazel/BUILD.trace_event_common",
)

View File

@ -0,0 +1,10 @@
# Copyright 2021 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
cc_library(
name = "trace_event_common",
hdrs = ["trace_event_common.h"],
include_prefix = "base/trace_event/common",
visibility = ["//visibility:public"],
)