40 lines · plain
1set(LLVM_LINK_COMPONENTS2 Core3 Support4 nativecodegen5 native6 )7 8add_mlir_tool(mlir-runner9 mlir-runner.cpp10 11 EXPORT_SYMBOLS12 )13llvm_update_compile_flags(mlir-runner)14mlir_target_link_libraries(mlir-runner PRIVATE15 MLIRAnalysis16 MLIRBuiltinToLLVMIRTranslation17 MLIRIR18 MLIRLLVMDialect19 MLIRLLVMToLLVMIRTranslation20 MLIRToLLVMIRTranslationRegistration21 MLIRParser22 MLIRTargetLLVMIRExport23 MLIRSupport24 )25target_link_libraries(mlir-runner PRIVATE26 MLIRExecutionEngine27 MLIRJitRunner28 )29 30# Preventing re-export of symbols causes link errors with ASan and UBSan libs.31if (NOT LLVM_USE_SANITIZER)32 target_link_options(mlir-runner33 PRIVATE34 # On Linux, disable re-export of any static linked libraries that came35 # through. This prevents our LLVM build from interfering with the version36 # of LLVM included in certain graphics drivers.37 $<$<PLATFORM_ID:Linux>:LINKER:--exclude-libs,ALL>38 )39endif()40