From ebdb7ee59f8de27d38a0b4557151deb0fc46aadf Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Wed, 5 Jan 2022 02:32:12 -0800 Subject: [PATCH] [bazel] Fix v8_torque when imported in another workspace. Signed-off-by: Piotr Sikora Change-Id: I6caa36473b9fb92358e45b795f3f6ff39100586d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3346680 Reviewed-by: Victor Gomes Cr-Commit-Position: refs/heads/main@{#78500} --- BUILD.bazel | 5 ----- bazel/defs.bzl | 7 ++++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 7443d0090b..72c6f1fc45 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -80,11 +80,6 @@ load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression # v8_enable_allocation_folding # v8_allocation_site_tracking -v8_string( - name = "v8_root", - default = "third_party/v8/HEAD", -) - v8_flag(name = "v8_android_log_stdout") v8_flag(name = "v8_annotate_torque_ir") diff --git a/bazel/defs.bzl b/bazel/defs.bzl index ea02213168..14fff6f049 100644 --- a/bazel/defs.bzl +++ b/bazel/defs.bzl @@ -278,8 +278,10 @@ def v8_library( ) def _torque_impl(ctx): - v8root = "." - prefix = ctx.attr.prefix + if ctx.workspace_name == "v8": + v8root = "." + else: + v8root = "external/v8" # Arguments args = [] @@ -331,7 +333,6 @@ _v8_torque = rule( cfg = "exec", ), "args": attr.string_list(), - "v8root": attr.label(default = ":v8_root"), }, )