[PATCH] D106115: [Bazel] Make gentbl_test compatible with coverage

Geoffrey Martin-Noble via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 13:57:30 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9c5b73fef44b: [Bazel] Make gentbl_test compatible with coverage (authored by GMNGeoffrey).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106115/new/

https://reviews.llvm.org/D106115

Files:
  utils/bazel/llvm-project-overlay/mlir/tblgen.bzl


Index: utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
===================================================================
--- utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
+++ utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
@@ -257,12 +257,19 @@
         is_executable = True,
     )
 
-    return [DefaultInfo(
-        runfiles = ctx.runfiles(
-            [ctx.executable.tblgen],
-            transitive_files = trans_srcs,
+    return [
+        coverage_common.instrumented_files_info(
+            ctx,
+            source_attributes = ["td_file", "td_srcs"],
+            dependency_attributes = ["tblgen", "deps"],
+        ),
+        DefaultInfo(
+            runfiles = ctx.runfiles(
+                [ctx.executable.tblgen],
+                transitive_files = trans_srcs,
+            ),
         ),
-    )]
+    ]
 
 gentbl_test = rule(
     _gentbl_test_impl,
@@ -271,8 +278,6 @@
           " that unlike gentbl_rule, this builds and invokes `tblgen` in the" +
           " target configuration. Takes all the same arguments as gentbl_rule" +
           " except for `out` (as it does not generate any output)",
-    # Match genrule behavior
-    output_to_genfiles = True,
     attrs = {
         "tblgen": attr.label(
             doc = "The TableGen executable run in the shell command. Note" +


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106115.359439.patch
Type: text/x-patch
Size: 1320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210716/2fb5c467/attachment.bin>


More information about the llvm-commits mailing list