Index: mlir/lib/Support/CMakeLists.txt =================================================================== --- mlir/lib/Support/CMakeLists.txt +++ mlir/lib/Support/CMakeLists.txt @@ -17,13 +17,13 @@ ) target_link_libraries(MLIRSupport LLVMSupport ${LLVM_PTHREAD_LIB}) -add_llvm_library(MLIROptMain +add_llvm_library(MLIROptLib MlirOptMain.cpp ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Support ) -target_link_libraries(MLIROptMain +target_link_libraries(MLIROptLib MLIRPass LLVMSupport MLIRSupport Index: mlir/tools/mlir-opt/CMakeLists.txt =================================================================== --- mlir/tools/mlir-opt/CMakeLists.txt +++ mlir/tools/mlir-opt/CMakeLists.txt @@ -10,10 +10,10 @@ MLIRTransforms MLIRSupport ) -add_llvm_library(MLIRMlirOptLib +add_llvm_library(MLIRMlirOptMain mlir-opt.cpp ) -target_link_libraries(MLIRMlirOptLib ${LIB_LIBS}) +target_link_libraries(MLIRMlirOptMain ${LIB_LIBS}) set(LIBS MLIRAnalysis @@ -34,7 +34,7 @@ MLIRLoopOps MLIRNVVMIR MLIROpenMP - MLIROptMain + MLIROptLib MLIRParser MLIRPass MLIRQuantizerTransforms @@ -67,4 +67,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 MLIRMlirOptMain ${LIBS} LLVMSupport)