[Mlir-commits] [mlir] c0861fc - [mlir] Only build mlir-cpu-runner when the native arch is targeted

Stella Stamenova llvmlistbot at llvm.org
Fri Jan 28 10:10:11 PST 2022


Author: Stella Stamenova
Date: 2022-01-28T10:09:09-08:00
New Revision: c0861fcbb90115e47a0fdef7c0cb346b0ef39cf5

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

LOG: [mlir] Only build mlir-cpu-runner when the native arch is targeted

mlir-cpu-runner has a dependency on ExecutionEngine which is only built for the native arch. So currently mlir-cpu-runner does not link correctly when the native arch is not targeted.

Reviewed By: mehdi_amini

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

Added: 
    

Modified: 
    mlir/tools/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/tools/CMakeLists.txt b/mlir/tools/CMakeLists.txt
index cc37bf2baf9da..06a582c4e0370 100644
--- a/mlir/tools/CMakeLists.txt
+++ b/mlir/tools/CMakeLists.txt
@@ -1,4 +1,3 @@
-add_subdirectory(mlir-cpu-runner)
 add_subdirectory(mlir-lsp-server)
 add_subdirectory(mlir-opt)
 add_subdirectory(mlir-pdll)
@@ -7,3 +6,9 @@ add_subdirectory(mlir-shlib)
 add_subdirectory(mlir-spirv-cpu-runner)
 add_subdirectory(mlir-translate)
 add_subdirectory(mlir-vulkan-runner)
+
+# mlir-cpu-runner requires ExecutionEngine which is only built
+# when the native target is configured in.
+if(TARGET ${LLVM_NATIVE_ARCH})
+  add_subdirectory(mlir-cpu-runner)
+endif()


        


More information about the Mlir-commits mailing list