File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
utils/bazel/llvm-project-overlay/mlir Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -128,16 +128,10 @@ gentbl_cc_library(
128128
129129gentbl_cc_library (
130130 name = "TensorEncodingIncGen" ,
131- tbl_outs = [
132- (
133- ["-gen-attr-interface-decls" ],
134- "include/mlir/IR/TensorEncInterfaces.h.inc" ,
135- ),
136- (
137- ["-gen-attr-interface-defs" ],
138- "include/mlir/IR/TensorEncInterfaces.cpp.inc" ,
139- ),
140- ],
131+ tbl_outs = {
132+ "include/mlir/IR/TensorEncInterfaces.h.inc" : ["-gen-attr-interface-decls" ],
133+ "include/mlir/IR/TensorEncInterfaces.cpp.inc" : ["-gen-attr-interface-defs" ],
134+ },
141135 tblgen = ":mlir-tblgen" ,
142136 td_file = "include/mlir/IR/TensorEncoding.td" ,
143137 deps = [":TensorOpsTdFiles" ],
Original file line number Diff line number Diff line change @@ -397,9 +397,9 @@ def gentbl_cc_library(
397397 name: The name of the generated cc_library rule for use in dependencies.
398398 tblgen: The binary used to produce the output.
399399 td_file: The primary table definitions file.
400- tbl_outs: A list of tuples ([opts], out), where each 'opts' is a list of
401- options passed to tblgen, each option being a string, and 'out' is the
402- corresponding output file produced.
400+ tbl_outs: Either a dict {out: [opts]} or a list of tuples ([opts], out),
401+ where each 'opts' is a list of options passed to tblgen, each option
402+ being a string, and 'out' is the corresponding output file produced.
403403 td_srcs: See gentbl_rule.td_srcs
404404 includes: See gentbl_rule.includes
405405 deps: See gentbl_rule.deps
@@ -409,6 +409,8 @@ def gentbl_cc_library(
409409 **kwargs: Extra keyword arguments to pass to all generated rules.
410410 """
411411
412+ if type (tbl_outs ) == type ({}):
413+ tbl_outs = [(v , k ) for k , v in tbl_outs .items ()]
412414 filegroup_name = name + "_filegroup"
413415 gentbl_filegroup (
414416 name = filegroup_name ,
You can’t perform that action at this time.
0 commit comments