Fix bazel build for mlir-opt
authorChenguang Wang <w3cing@gmail.com>
Mon, 27 Mar 2023 18:44:15 +0000 (11:44 -0700)
committerChenguang Wang <w3cing@gmail.com>
Mon, 27 Mar 2023 18:57:35 +0000 (11:57 -0700)
Tested locally with `bazel build --repo_env=CC=clang --repo_env=BAZEL_CXXOPTS="-std=c++17" @llvm-project//mlir:mlir-opt`.

Reviewed By: jyknight

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

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

index 2b6d35e..b80ddae 100644 (file)
@@ -7209,6 +7209,7 @@ cc_binary(
         "//mlir/test:TestMath",
         "//mlir/test:TestMemRef",
         "//mlir/test:TestNVGPU",
+        "//mlir/test:TestOneToNTypeConversion",
         "//mlir/test:TestPDLL",
         "//mlir/test:TestPass",
         "//mlir/test:TestReducer",
index 9440885..0cf7e23 100644 (file)
@@ -509,6 +509,21 @@ cc_library(
 )
 
 cc_library(
+    name = "TestOneToNTypeConversion",
+    srcs = glob(["lib/Conversion/OneToNTypeConversion/*.cpp"]),
+    defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
+    includes = ["lib/Dialect/Test"],
+    deps = [
+        ":TestDialect",
+        "//mlir:FuncDialect",
+        "//mlir:FuncTransforms",
+        "//mlir:IR",
+        "//mlir:Pass",
+        "//mlir:TransformUtils",
+    ],
+)
+
+cc_library(
     name = "TestVectorToSPIRV",
     srcs = glob(["lib/Conversion/VectorToSPIRV/*.cpp"]),
     deps = [