Skip to content

Commit ba6af8f

Browse files
committed
[mlir][Bazel] Adapt to 2ae5d1c
1 parent baf2d13 commit ba6af8f

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8203,12 +8203,14 @@ cc_library(
82038203
cc_library(
82048204
name = "MlirTranslateMain",
82058205
srcs = ["tools/mlir-translate/mlir-translate.cpp"],
8206+
local_defines = ["MLIR_INCLUDE_TESTS"],
82068207
deps = [
82078208
":AllPassesAndDialects",
82088209
":AllTranslations",
82098210
":Support",
82108211
":TranslateLib",
82118212
"//llvm:Support",
8213+
"//mlir/test:TestToLLVMIRTranslation",
82128214
],
82138215
)
82148216

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,10 @@ cc_library(
368368

369369
cc_library(
370370
name = "TestDialect",
371-
srcs = glob(["lib/Dialect/Test/*.cpp"]),
371+
srcs = glob(
372+
["lib/Dialect/Test/*.cpp"],
373+
exclude = ["lib/Dialect/Test/TestToLLVMIRTranslation.cpp"],
374+
),
372375
hdrs = glob(["lib/Dialect/Test/*.h"]),
373376
includes = [
374377
"lib/Dialect/Test",
@@ -410,6 +413,20 @@ cc_library(
410413
],
411414
)
412415

416+
cc_library(
417+
name = "TestToLLVMIRTranslation",
418+
srcs = ["lib/Dialect/Test/TestToLLVMIRTranslation.cpp"],
419+
deps = [
420+
":TestDialect",
421+
"//llvm:Support",
422+
"//mlir:BuiltinToLLVMIRTranslation",
423+
"//mlir:IR",
424+
"//mlir:LLVMToLLVMIRTranslation",
425+
"//mlir:ToLLVMIRTranslation",
426+
"//mlir:TranslateLib",
427+
],
428+
)
429+
413430
cc_library(
414431
name = "TestIR",
415432
srcs = glob(["lib/IR/*.cpp"]),

0 commit comments

Comments
 (0)