[bazel] Use //external: bindings for dependencies.

This simplifies integration with Bazel workspaces that already
have those libraries imported under different repository names.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Change-Id: Iee6dee1abb8fca10f6b998b2ec9f459c14376bc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3333633
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78552}
This commit is contained in:
Piotr Sikora 2022-01-10 12:39:42 -08:00 committed by V8 LUCI CQ
parent f2724654a5
commit d1f04238f5
3 changed files with 26 additions and 6 deletions

View File

@ -3366,7 +3366,7 @@ v8_library(
],
icu_deps = [
":icu/generated_torque_headers",
"@com_googlesource_chromium_icu//:icu",
"//external:icu",
],
icu_srcs = [
":generated_regexp_special_case",
@ -3381,9 +3381,9 @@ v8_library(
],
deps = [
":v8_libbase",
"@com_googlesource_chromium_base_trace_event_common//:trace_event_common",
"@com_googlesource_chromium_zlib//:zlib",
"@com_googlesource_chromium_zlib//:zlib_compression_utils",
"//external:base_trace_event_common",
"//external:zlib",
"//external:zlib_compression_utils",
],
)
@ -3451,7 +3451,7 @@ v8_binary(
"UNISTR_FROM_CHAR_EXPLICIT=",
],
deps = [
"@com_googlesource_chromium_icu//:icu",
"//external:icu",
],
)

View File

@ -37,14 +37,34 @@ new_local_repository(
build_file = "bazel/BUILD.zlib",
)
bind(
name = "zlib",
actual = "@com_googlesource_chromium_zlib//:zlib",
)
bind(
name = "zlib_compression_utils",
actual = "@com_googlesource_chromium_zlib//:zlib_compression_utils",
)
new_local_repository(
name = "com_googlesource_chromium_icu",
path = "third_party/icu",
build_file = "bazel/BUILD.icu",
)
bind(
name = "icu",
actual = "@com_googlesource_chromium_icu//:icu",
)
new_local_repository(
name = "com_googlesource_chromium_base_trace_event_common",
path = "base/trace_event/common",
build_file = "bazel/BUILD.trace_event_common",
)
bind(
name = "base_trace_event_common",
actual = "@com_googlesource_chromium_base_trace_event_common//:trace_event_common",
)

View File

@ -64,6 +64,6 @@ cc_library(
include_prefix = "third_party/zlib",
visibility = ["//visibility:public"],
deps = [
":zlib",
"//external:zlib",
],
)