diff --git a/mlir/lib/Support/CMakeLists.txt b/mlir/lib/Support/CMakeLists.txt --- a/mlir/lib/Support/CMakeLists.txt +++ b/mlir/lib/Support/CMakeLists.txt @@ -34,6 +34,8 @@ add_llvm_library(MLIRSupportIndentedOstream IndentedOstream.cpp - LINK_LIBS PUBLIC - LLVMSupport + DISABLE_LLVM_LINK_LLVM_DYLIB + + LINK_COMPONENTS + Support ) diff --git a/mlir/tools/mlir-cuda-runner/CMakeLists.txt b/mlir/tools/mlir-cuda-runner/CMakeLists.txt --- a/mlir/tools/mlir-cuda-runner/CMakeLists.txt +++ b/mlir/tools/mlir-cuda-runner/CMakeLists.txt @@ -41,8 +41,6 @@ set(LIBS ${dialect_libs} ${conversion_libs} - LLVMCore - LLVMSupport MLIRJitRunner MLIRAnalysis MLIREDSC @@ -73,6 +71,10 @@ DEPENDS cuda-runtime-wrappers + + LINK_COMPONENTS + Core + Support ) target_include_directories(mlir-cuda-runner PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES} diff --git a/mlir/tools/mlir-rocm-runner/CMakeLists.txt b/mlir/tools/mlir-rocm-runner/CMakeLists.txt --- a/mlir/tools/mlir-rocm-runner/CMakeLists.txt +++ b/mlir/tools/mlir-rocm-runner/CMakeLists.txt @@ -72,12 +72,6 @@ lldCommon lldDriver lldELF - LLVMCore - LLVMLTO - LLVMMC - LLVMMCParser - LLVMOption - LLVMSupport MLIRJitRunner MLIRAnalysis MLIREDSC @@ -109,6 +103,15 @@ DEPENDS rocm-runtime-wrappers + + LINK_COMPONENTS + + Core + LTO + MC + MCParser + Option + Support ) llvm_update_compile_flags(mlir-rocm-runner) target_include_directories(mlir-rocm-runner diff --git a/mlir/tools/mlir-tblgen/CMakeLists.txt b/mlir/tools/mlir-tblgen/CMakeLists.txt --- a/mlir/tools/mlir-tblgen/CMakeLists.txt +++ b/mlir/tools/mlir-tblgen/CMakeLists.txt @@ -1,8 +1,3 @@ -set(LLVM_LINK_COMPONENTS - Demangle - Support - TableGen - ) add_tablegen(mlir-tblgen MLIR DialectGen.cpp diff --git a/mlir/tools/mlir-vulkan-runner/CMakeLists.txt b/mlir/tools/mlir-vulkan-runner/CMakeLists.txt --- a/mlir/tools/mlir-vulkan-runner/CMakeLists.txt +++ b/mlir/tools/mlir-vulkan-runner/CMakeLists.txt @@ -57,8 +57,6 @@ set(LIBS ${dialect_libs} ${conversion_libs} - LLVMCore - LLVMSupport MLIRAnalysis MLIREDSC MLIRExecutionEngine @@ -87,6 +85,10 @@ add_llvm_tool(mlir-vulkan-runner mlir-vulkan-runner.cpp + + LINK_COMPONENTS + Core + Support ) add_dependencies(mlir-vulkan-runner vulkan-runtime-wrappers) llvm_update_compile_flags(mlir-vulkan-runner)