[Mlir-commits] [mlir] 46b1e83 - Do not build llc and mlir-cpu-runner to run MLIR tests with the native target isn't configured (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Jan 13 23:30:44 PST 2022


Author: Mehdi Amini
Date: 2022-01-14T07:30:34Z
New Revision: 46b1e837169885bda02792682020d65d8ca21818

URL: https://github.com/llvm/llvm-project/commit/46b1e837169885bda02792682020d65d8ca21818
DIFF: https://github.com/llvm/llvm-project/commit/46b1e837169885bda02792682020d65d8ca21818.diff

LOG: Do not build llc and mlir-cpu-runner to run MLIR tests with the native target isn't configured (NFC)

The relevant tests are already disabled in this case.

Added: 
    

Modified: 
    mlir/test/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
index 0aba117e3c41..e6bbd30c62ef 100644
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -74,7 +74,7 @@ configure_lit_site_cfg(
   )
 
 set(MLIR_TEST_DEPENDS
-  FileCheck count not split-file llc
+  FileCheck count not split-file
   mlir-capi-execution-engine-test
   mlir-capi-ir-test
   mlir-capi-llvm-test
@@ -82,7 +82,6 @@ set(MLIR_TEST_DEPENDS
   mlir-capi-sparse-tensor-test
   mlir-capi-quant-test
   mlir-capi-pdl-test
-  mlir-cpu-runner
   mlir-linalg-ods-yaml-gen
   mlir-lsp-server
   mlir-opt
@@ -95,6 +94,14 @@ set(MLIR_TEST_DEPENDS
   mlir_async_runtime
   )
 
+# The native target may not be enabled when cross compiling, raise an error.
+if(TARGET ${LLVM_NATIVE_ARCH})
+  list(APPEND MLIR_TEST_DEPENDS
+    mlir-cpu-runner
+    llc
+  )
+endif()
+
 if (MLIR_INCLUDE_INTEGRATION_TESTS)
   list(APPEND MLIR_TEST_DEPENDS lli)
 endif()


        


More information about the Mlir-commits mailing list