Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 5d2cd83

Browse files
authored
Current Bazel has a bug (bazelbuild/bazel#3828) when using `strip_include_prefix` that causes Bazel to erroneously report a missing dependency declaration. This bug shows up when trying to `bazel build @llvm-project//llvm:NVPTXCodeGen`: ``` undeclared inclusion(s) in rule '@llvm-project//llvm:NVPTXCodeGen': this rule is missing dependency declarations for the following files included by 'external/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp': 'external/llvm-project/llvm/lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.h' ``` This has been fixed in bazelbuild/bazel@e3b7e17. This PR is a workaround until we have a Bazel version that contains the fix.
1 parent bc9a93f commit 5d2cd83

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • llvm-bazel/llvm-project-overlay/llvm

‎llvm-bazel/llvm-project-overlay/llvm/BUILD‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,10 @@ gentbl(
17161716
srcs = ["lib/Target/" + target["name"] + "/TargetInfo/" + target["name"] + "TargetInfo.cpp"],
17171717
hdrs = glob(["lib/Target/" + target["name"] + "/TargetInfo/*.h"]),
17181718
copts = llvm_copts,
1719+
# Workaround for https://github.com/bazelbuild/bazel/issues/3828
1720+
# TODO(gcmn): Remove this when upgrading to a Bazel version containing
1721+
# https://github.com/bazelbuild/bazel/commit/e3b7e17b05f1
1722+
includes = ["lib/Target/" + target["name"]],
17191723
strip_include_prefix = "lib/Target/" + target["name"],
17201724
deps = [
17211725
":" + target["name"] + "CommonTableGen",

0 commit comments

Comments
 (0)