Skip to content

Commit a1c3914

Browse files
committed
Add mlir-query bazel rules
1 parent afd0e6d commit a1c3914

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14028,6 +14028,64 @@ cc_binary(
1402814028
],
1402914029
)
1403014030

14031+
cc_library(
14032+
name = "MlirQueryUtils",
14033+
srcs = glob(
14034+
[
14035+
"lib/Query/Matcher/*.cpp",
14036+
"lib/Query/Matcher/*.h",
14037+
"lib/Query/*.cpp",
14038+
"lib/Query/*.h",
14039+
],
14040+
),
14041+
hdrs = glob(
14042+
[
14043+
"include/mlir/Query/Matcher/*.h",
14044+
"include/mlir/Query/*.h",
14045+
],
14046+
),
14047+
includes = ["include"],
14048+
deps = [
14049+
":IR",
14050+
":Reducer",
14051+
":Rewrite",
14052+
":FuncDialect",
14053+
"//llvm:LineEditor",
14054+
"//llvm:Support",
14055+
],
14056+
)
14057+
14058+
cc_library(
14059+
name = "MlirQueryLib",
14060+
srcs = ["lib/Tools/mlir-query/MlirQueryMain.cpp"],
14061+
hdrs = ["include/mlir/Tools/mlir-query/MlirQueryMain.h"],
14062+
includes = ["include"],
14063+
deps = [
14064+
":IR",
14065+
":MlirQueryUtils",
14066+
":Parser",
14067+
":Support",
14068+
"//llvm:LineEditor",
14069+
"//llvm:Support",
14070+
],
14071+
)
14072+
14073+
cc_binary(
14074+
name = "mlir-query",
14075+
srcs = ["tools/mlir-query/mlir-query.cpp"],
14076+
includes = ["include"],
14077+
local_defines = ["MLIR_INCLUDE_TESTS"],
14078+
stamp = 0,
14079+
deps = [
14080+
":AllPassesAndDialects",
14081+
":MlirQueryLib",
14082+
":MlirQueryUtils",
14083+
":IR",
14084+
"//llvm:Support",
14085+
"//mlir/test:TestDialect",
14086+
],
14087+
)
14088+
1403114089
cc_library(
1403214090
name = "PDLLODS",
1403314091
srcs = glob(

0 commit comments

Comments
 (0)