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 @@ -17,7 +17,7 @@ ) target_link_libraries(MLIRSupport LLVMSupport ${LLVM_PTHREAD_LIB}) -add_llvm_library(MLIROptMain +add_llvm_library(MLIROptMain BUILDTREE_ONLY MlirOptMain.cpp ADDITIONAL_HEADER_DIRS @@ -37,7 +37,7 @@ ) target_link_libraries(MLIRTranslateClParser LLVMSupport) -add_llvm_library(MLIRJitRunner +add_llvm_library(MLIRJitRunner BUILDTREE_ONLY JitRunner.cpp ) target_link_libraries(MLIRJitRunner PRIVATE diff --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt --- a/mlir/tools/mlir-opt/CMakeLists.txt +++ b/mlir/tools/mlir-opt/CMakeLists.txt @@ -10,7 +10,7 @@ MLIRTransforms MLIRSupport ) -add_llvm_library(MLIRMlirOptLib +add_llvm_library(MLIRMlirOptLib BUILDTREE_ONLY mlir-opt.cpp ) target_link_libraries(MLIRMlirOptLib ${LIB_LIBS}) @@ -65,4 +65,4 @@ ) llvm_update_compile_flags(mlir-opt) whole_archive_link(mlir-opt ${LIBS}) -target_link_libraries(mlir-opt PRIVATE MLIRIR MLIRMlirOptLib ${LIBS} LLVMSupport) +target_link_libraries(mlir-opt PRIVATE MLIRIR MLIROptMain MLIRMlirOptLib ${LIBS} LLVMSupport)