[all-commits] [llvm/llvm-project] d98349: [Bazel] Make td_library usable as data

Geoffrey Martin-Noble via All-commits all-commits at lists.llvm.org
Thu Jul 29 18:12:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d983499543ee9f5b2fec3d437e0a15acacb9586d
      https://github.com/llvm/llvm-project/commit/d983499543ee9f5b2fec3d437e0a15acacb9586d
  Author: Geoffrey Martin-Noble <gcmn at google.com>
  Date:   2021-07-29 (Thu, 29 Jul 2021)

  Changed paths:
    M utils/bazel/llvm-project-overlay/mlir/tblgen.bzl

  Log Message:
  -----------
  [Bazel] Make td_library usable as data

This patch makes it possible to list a td_library as a rule's data
attribute and get its source files and all its transitive dependencies
at runtime. This is useful for, e.g. shell tests running tblgen.

Note that this is a bit different from how a "normal" (e.g. C++) library
rule would work because those have actual library outputs and the
td_library rule just bundles some source files and includes. If someone
wanted to make use of the includes, they would have to access the TdInfo
provider, but this keeps simple things simple.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D106922




More information about the All-commits mailing list