[Mlir-commits] [mlir] 4bde9aa - Add CMake dependency from MLIRJitRunner on all dialects

Mehdi Amini llvmlistbot at llvm.org
Fri Oct 23 18:24:16 PDT 2020


Author: Mehdi Amini
Date: 2020-10-24T01:24:05Z
New Revision: 4bde9aa9644a54e6e650809d8460cff0b9e17c2a

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

LOG: Add CMake dependency from MLIRJitRunner on all dialects

This dependency was already existing indirectly, but is now more direct
since the registration relies on a inline function. This fixes the
link of the tools with BFD.

Added: 
    

Modified: 
    mlir/lib/ExecutionEngine/CMakeLists.txt
    mlir/tools/mlir-cpu-runner/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index 407be2f5c684..47dbe45d8138 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -46,6 +46,7 @@ add_mlir_library(MLIRExecutionEngine
   MLIRTargetLLVMIR
   )
 
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
 add_mlir_library(MLIRJitRunner
   JitRunner.cpp
 
@@ -60,6 +61,7 @@ add_mlir_library(MLIRJitRunner
   JITLink
 
   LINK_LIBS PUBLIC
+  ${dialect_libs}
   MLIRExecutionEngine
   MLIRIR
   MLIRParser

diff  --git a/mlir/tools/mlir-cpu-runner/CMakeLists.txt b/mlir/tools/mlir-cpu-runner/CMakeLists.txt
index 8aa7abc16ba4..596012c88228 100644
--- a/mlir/tools/mlir-cpu-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-cpu-runner/CMakeLists.txt
@@ -10,12 +10,12 @@ add_llvm_tool(mlir-cpu-runner
 llvm_update_compile_flags(mlir-cpu-runner)
 get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
 target_link_libraries(mlir-cpu-runner PRIVATE
-  MLIRJitRunner
   ${dialect_libs}
   MLIRAnalysis
   MLIREDSC
   MLIRExecutionEngine
   MLIRIR
+  MLIRJitRunner
   MLIRLLVMIR
   MLIRParser
   MLIRTargetLLVMIR


        


More information about the Mlir-commits mailing list