From a6e91040eaadd1fa1c30a7c8a28d360b807d4258 Mon Sep 17 00:00:00 2001 From: Christian Sigg Date: Fri, 16 Sep 2022 22:27:04 +0200 Subject: [PATCH] [Bazel] Allow lit_test() macro to be used from other repos. Wrap implicit dependencies in Label() so that they refer to @llvm-project, see https://bazel.build/rules/lib/Label#Label. This change allows lit_test() to be used from other bazel repositories. --- utils/bazel/llvm-project-overlay/llvm/lit_test.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/bazel/llvm-project-overlay/llvm/lit_test.bzl b/utils/bazel/llvm-project-overlay/llvm/lit_test.bzl index 47ec267..ce2a0a0 100644 --- a/utils/bazel/llvm-project-overlay/llvm/lit_test.bzl +++ b/utils/bazel/llvm-project-overlay/llvm/lit_test.bzl @@ -30,8 +30,8 @@ def lit_test( native.py_test( name = name, - srcs = ["//llvm:lit"], - main = "//llvm:utils/lit/lit.py", + srcs = [Label("//llvm:lit")], + main = Label("//llvm:utils/lit/lit.py"), args = args + ["-v"] + ["$(execpath %s)" % src for src in srcs], data = data + srcs, legacy_create_init = False, -- 2.7.4