Bazel fix - try splitting out llvm-tblgen into a library to support .def files
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 4 Apr 2023 17:30:31 +0000 (17:30 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 4 Apr 2023 17:30:56 +0000 (17:30 +0000)
utils/bazel/llvm-project-overlay/llvm/BUILD.bazel

index 06eeff8..1c7dfd9 100644 (file)
@@ -599,8 +599,15 @@ cc_library(
 
 cc_binary(
     name = "llvm-tblgen",
+    deps = [":UtilsTableGen"]
+    stamp = 0,
+)
+
+cc_library(
+    name = "UtilsTablgen",
     srcs = glob([
         "utils/TableGen/*.cpp",
+        "utils/TableGen/*.def",
         "utils/TableGen/*.inc",
         "utils/TableGen/*.h",
 
@@ -609,11 +616,7 @@ cc_binary(
         # regular dependency.
         "include/llvm/MC/*.h",
     ]),
-    textual_hdrs = glob([
-        "utils/TableGen/*.def",
-    ]),
     copts = llvm_copts,
-    stamp = 0,
     deps = [
         ":LLVMTableGenGlobalISel",
         ":Support",