From: Christian Sigg Date: Fri, 16 Sep 2022 20:27:04 +0000 (+0200) Subject: [Bazel] Allow lit_test() macro to be used from other repos. X-Git-Tag: upstream/17.0.6~33280 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6e91040eaadd1fa1c30a7c8a28d360b807d4258;p=platform%2Fupstream%2Fllvm.git [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. --- 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,