[Mlir-commits] [mlir] [mlir] Add support for MLIR_LINK_MLIR_DYLIB (PR #119408)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Dec 22 15:42:58 PST 2024


Zentrik wrote:

FWIW, this broke building on windows with mingw for me with `LLVM_BUILD_LLVM_DYLIB`, `LLVM_LINK_LLVM_DYLIB` and `MLIR_BUILD_MLIR_C_DYLIB` set with the following error (full log at https://github.com/Zentrik/llvm_julia_tester/actions/runs/12423441352/job/34686970477)
```
2024-12-20T05:07:02.7907449Z [05:07:02] ninja: job failed: : && /opt/bin/x86_64-w64-mingw32-libgfortran5-cxx11/x86_64-w64-mingw32-clang++ --target=x86_64-w64-mingw32 --sysroot=/opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/ -remap -D__USING_SJLJ_EXCEPTIONS__ -D__CRT__NO_INLINE -pthread -DMLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC -Dmlir_arm_sme_abi_stubs_EXPORTS -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O3 -DNDEBUG -Wl,--stack,16777216    -Wl,--gc-sections tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/DummyParserFuzzer.cpp.obj tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj -o bin/mlir-text-parser-fuzzer.exe -Wl,--out-implib,lib/libmlir-text-parser-fuzzer.dll.a -Wl,--major-image-version,0,--minor-image-version,0  lib/libMLIR.dll.a  lib/libLLVM-20jl.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && :
2024-12-20T05:07:02.7915777Z [05:07:02] clang-16: warning: argument unused during compilation: '-remap' [-Wunused-command-line-argument]
2024-12-20T05:07:02.7917223Z [05:07:02] ld.lld: error: undefined symbol: mlir::SuccessorRange::SuccessorRange(mlir::Operation*)
2024-12-20T05:07:02.7919009Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::Operation::debug_getSuccessors())
2024-12-20T05:07:02.7995542Z [05:07:02] 
2024-12-20T05:07:02.7996151Z [05:07:02] ld.lld: error: undefined symbol: mlir::DialectRegistry::DialectRegistry()
2024-12-20T05:07:02.7997503Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.7998609Z [05:07:02] 
2024-12-20T05:07:02.7999332Z [05:07:02] ld.lld: error: undefined symbol: mlir::MLIRContext::MLIRContext(mlir::DialectRegistry const&, mlir::MLIRContext::Threading)
2024-12-20T05:07:02.8000883Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.8002001Z [05:07:02] 
2024-12-20T05:07:02.8002532Z [05:07:02] ld.lld: error: undefined symbol: mlir::MLIRContext::allowUnregisteredDialects(bool)
2024-12-20T05:07:02.8003832Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.8004899Z [05:07:02] 
2024-12-20T05:07:02.8005332Z [05:07:02] ld.lld: error: undefined symbol: mlir::MLIRContext::getDiagEngine()
2024-12-20T05:07:02.8006558Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.8007998Z [05:07:02] 
2024-12-20T05:07:02.8008764Z [05:07:02] ld.lld: error: undefined symbol: mlir::DiagnosticEngine::registerHandler(llvm::unique_function<llvm::LogicalResult (mlir::Diagnostic&)>)
2024-12-20T05:07:02.8010699Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.8011962Z [05:07:02] 
2024-12-20T05:07:02.8013215Z [05:07:02] ld.lld: error: undefined symbol: mlir::parseSourceString(llvm::StringRef, mlir::Block*, mlir::ParserConfig const&, llvm::StringRef, mlir::LocationAttr*)
2024-12-20T05:07:02.8015129Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.8016387Z [05:07:02] 
2024-12-20T05:07:02.8016836Z [05:07:02] ld.lld: error: undefined symbol: mlir::Block::~Block()
2024-12-20T05:07:02.8018371Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.8019596Z [05:07:02] 
2024-12-20T05:07:02.8020097Z [05:07:02] ld.lld: error: undefined symbol: mlir::Operation::erase()
2024-12-20T05:07:02.8021501Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.8024268Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::OwningOpRef<mlir::ModuleOp> mlir::detail::constructContainerOpForParserIfNecessary<mlir::ModuleOp>(mlir::Block*, mlir::MLIRContext*, mlir::Location))
2024-12-20T05:07:02.8026250Z [05:07:02] 
2024-12-20T05:07:02.8026777Z [05:07:02] ld.lld: error: undefined symbol: mlir::MLIRContext::~MLIRContext()
2024-12-20T05:07:02.8028235Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(LLVMFuzzerTestOneInput)
2024-12-20T05:07:02.8029472Z [05:07:02] 
2024-12-20T05:07:02.8048255Z [05:07:02] ld.lld: error: undefined symbol: llvm::ilist_traits<mlir::Operation>::transferNodesFromList(llvm::ilist_traits<mlir::Operation>&, llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Operation, true, false, void, false, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<mlir::Operation, true, false, void, false, void>, false, false>)
2024-12-20T05:07:02.8051622Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::OwningOpRef<mlir::ModuleOp> mlir::detail::constructContainerOpForParserIfNecessary<mlir::ModuleOp>(mlir::Block*, mlir::MLIRContext*, mlir::Location))
2024-12-20T05:07:02.8053405Z [05:07:02] 
2024-12-20T05:07:02.8053851Z [05:07:02] ld.lld: error: undefined symbol: mlir::ModuleOp::verifyInvariants()
2024-12-20T05:07:02.8055667Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::OwningOpRef<mlir::ModuleOp> mlir::detail::constructContainerOpForParserIfNecessary<mlir::ModuleOp>(mlir::Block*, mlir::MLIRContext*, mlir::Location))
2024-12-20T05:07:02.8057526Z [05:07:02] 
2024-12-20T05:07:02.8058788Z [05:07:02] ld.lld: error: undefined symbol: llvm::ilist_detail::SpecificNodeAccess<llvm::ilist_detail::node_options<mlir::Operation, true, false, void, false, void>>::getValuePtr(llvm::ilist_node_impl<llvm::ilist_detail::node_options<mlir::Operation, true, false, void, false, void>>*)
2024-12-20T05:07:02.8061551Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::OwningOpRef<mlir::ModuleOp> mlir::detail::constructContainerOpForParserIfNecessary<mlir::ModuleOp>(mlir::Block*, mlir::MLIRContext*, mlir::Location))
2024-12-20T05:07:02.8063272Z [05:07:02] 
2024-12-20T05:07:02.8063659Z [05:07:02] ld.lld: error: undefined symbol: mlir::Operation::remove()
2024-12-20T05:07:02.8065798Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::OwningOpRef<mlir::ModuleOp> mlir::detail::constructContainerOpForParserIfNecessary<mlir::ModuleOp>(mlir::Block*, mlir::MLIRContext*, mlir::Location))
2024-12-20T05:07:02.8067844Z [05:07:02] 
2024-12-20T05:07:02.8068313Z [05:07:02] ld.lld: error: undefined symbol: mlir::Attribute::getContext() const
2024-12-20T05:07:02.8069852Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::ModuleOp mlir::OpBuilder::create<mlir::ModuleOp>(mlir::Location))
2024-12-20T05:07:02.8071184Z [05:07:02] 
2024-12-20T05:07:02.8071995Z [05:07:02] ld.lld: error: undefined symbol: mlir::RegisteredOperationName::lookup(mlir::TypeID, mlir::MLIRContext*)
2024-12-20T05:07:02.8073727Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::ModuleOp mlir::OpBuilder::create<mlir::ModuleOp>(mlir::Location))
2024-12-20T05:07:02.8075071Z [05:07:02] 
2024-12-20T05:07:02.8075726Z [05:07:02] ld.lld: error: undefined symbol: mlir::OperationState::OperationState(mlir::Location, mlir::OperationName)
2024-12-20T05:07:02.8077459Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::ModuleOp mlir::OpBuilder::create<mlir::ModuleOp>(mlir::Location))
2024-12-20T05:07:02.8078766Z [05:07:02] 
2024-12-20T05:07:02.8079487Z [05:07:02] ld.lld: error: undefined symbol: mlir::ModuleOp::build(mlir::OpBuilder&, mlir::OperationState&, std::optional<llvm::StringRef>)
2024-12-20T05:07:02.8081244Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::ModuleOp mlir::OpBuilder::create<mlir::ModuleOp>(mlir::Location))
2024-12-20T05:07:02.8082453Z [05:07:02] 
2024-12-20T05:07:02.8085633Z [05:07:02] ld.lld: error: undefined symbol: mlir::OpBuilder::create(mlir::OperationState const&)
2024-12-20T05:07:02.8087582Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::ModuleOp mlir::OpBuilder::create<mlir::ModuleOp>(mlir::Location))
2024-12-20T05:07:02.8088910Z [05:07:02] 
2024-12-20T05:07:02.8089387Z [05:07:02] ld.lld: error: undefined symbol: mlir::OperationState::~OperationState()
2024-12-20T05:07:02.8091026Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-parser-fuzzer/text/CMakeFiles/mlir-text-parser-fuzzer.dir/mlir-text-parser-fuzzer.cpp.obj:(mlir::ModuleOp mlir::OpBuilder::create<mlir::ModuleOp>(mlir::Location))
2024-12-20T05:07:02.8092409Z [05:07:02] 
2024-12-20T05:07:02.8092993Z [05:07:02] ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
2024-12-20T05:07:02.8093915Z [05:07:02] clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
2024-12-20T05:07:02.8100485Z [05:07:02] ninja: job failed: : && /opt/bin/x86_64-w64-mingw32-libgfortran5-cxx11/x86_64-w64-mingw32-clang++ --target=x86_64-w64-mingw32 --sysroot=/opt/x86_64-w64-mingw32/x86_64-w64-mingw32/sys-root/ -remap -D__USING_SJLJ_EXCEPTIONS__ -D__CRT__NO_INLINE -pthread -DMLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC -Dmlir_arm_sme_abi_stubs_EXPORTS -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O3 -DNDEBUG -Wl,--stack,16777216 tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj -o bin/mlir-rewrite.exe -Wl,--out-implib,lib/libmlir-rewrite.dll.a -Wl,--major-image-version,0,--minor-image-version,0  lib/libMLIR.dll.a  lib/libLLVM-20jl.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && :
2024-12-20T05:07:02.8107359Z [05:07:02] clang-16: warning: argument unused during compilation: '-remap' [-Wunused-command-line-argument]
2024-12-20T05:07:02.8108397Z [05:07:02] ld.lld: error: undefined symbol: mlir::SuccessorRange::SuccessorRange(mlir::Operation*)
2024-12-20T05:07:02.8109619Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::Operation::debug_getSuccessors())
2024-12-20T05:07:02.8110586Z [05:07:02] 
2024-12-20T05:07:02.8111146Z [05:07:02] ld.lld: error: undefined symbol: mlir::MLIRContext::MLIRContext(mlir::MLIRContext::Threading)
2024-12-20T05:07:02.8112667Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::RewritePad::init(llvm::StringRef, llvm::StringRef))
2024-12-20T05:07:02.8113715Z [05:07:02] 
2024-12-20T05:07:02.8114193Z [05:07:02] ld.lld: error: undefined symbol: mlir::DialectRegistry::DialectRegistry()
2024-12-20T05:07:02.8115391Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::RewritePad::init(llvm::StringRef, llvm::StringRef))
2024-12-20T05:07:02.8116451Z [05:07:02] 
2024-12-20T05:07:02.8116912Z [05:07:02] ld.lld: error: undefined symbol: mlir::AsmParserState::AsmParserState()
2024-12-20T05:07:02.8118161Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::RewritePad::init(llvm::StringRef, llvm::StringRef))
2024-12-20T05:07:02.8119190Z [05:07:02] 
2024-12-20T05:07:02.8119970Z [05:07:02] ld.lld: error: undefined symbol: mlir::openInputFile(llvm::StringRef, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
2024-12-20T05:07:02.8121464Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::RewritePad::init(llvm::StringRef, llvm::StringRef))
2024-12-20T05:07:02.8122446Z [05:07:02] 
2024-12-20T05:07:02.8123143Z [05:07:02] ld.lld: error: undefined symbol: mlir::MLIRContext::appendDialectRegistry(mlir::DialectRegistry const&)
2024-12-20T05:07:02.8124585Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::RewritePad::init(llvm::StringRef, llvm::StringRef))
2024-12-20T05:07:02.8125541Z [05:07:02] 
2024-12-20T05:07:02.8126005Z [05:07:02] ld.lld: error: undefined symbol: mlir::MLIRContext::allowUnregisteredDialects(bool)
2024-12-20T05:07:02.8127159Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::RewritePad::init(llvm::StringRef, llvm::StringRef))
2024-12-20T05:07:02.8130507Z [05:07:02] 
2024-12-20T05:07:02.8131488Z [05:07:02] ld.lld: error: undefined symbol: mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*)
2024-12-20T05:07:02.8133212Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::RewritePad::init(llvm::StringRef, llvm::StringRef))
2024-12-20T05:07:02.8134181Z [05:07:02] 
2024-12-20T05:07:02.8134859Z [05:07:02] ld.lld: error: undefined symbol: mlir::affine::registerValueBoundsOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8136227Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8137169Z [05:07:02] 
2024-12-20T05:07:02.8137959Z [05:07:02] ld.lld: error: undefined symbol: mlir::arith::registerBufferDeallocationOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8139323Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8140393Z [05:07:02] 
2024-12-20T05:07:02.8141089Z [05:07:02] ld.lld: error: undefined symbol: mlir::arith::registerBufferizableOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8142432Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8143459Z [05:07:02] 
2024-12-20T05:07:02.8144188Z [05:07:02] ld.lld: error: undefined symbol: mlir::arith::registerBufferViewFlowOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8145523Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8146561Z [05:07:02] 
2024-12-20T05:07:02.8147426Z [05:07:02] ld.lld: error: undefined symbol: mlir::arith::registerValueBoundsOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8148967Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8150013Z [05:07:02] 
2024-12-20T05:07:02.8150876Z [05:07:02] ld.lld: error: undefined symbol: mlir::bufferization::func_ext::registerBufferizableOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8152528Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8153539Z [05:07:02] 
2024-12-20T05:07:02.8154211Z [05:07:02] ld.lld: error: undefined symbol: mlir::builtin::registerCastOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8156012Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8157063Z [05:07:02] 
2024-12-20T05:07:02.8157773Z [05:07:02] ld.lld: error: undefined symbol: mlir::cf::registerBufferizableOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8159308Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8160219Z [05:07:02] 
2024-12-20T05:07:02.8160966Z [05:07:02] ld.lld: error: undefined symbol: mlir::cf::registerBufferDeallocationOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8162565Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8163629Z [05:07:02] 
2024-12-20T05:07:02.8164445Z [05:07:02] ld.lld: error: undefined symbol: mlir::gpu::registerBufferDeallocationOpInterfaceExternalModels(mlir::DialectRegistry&)
2024-12-20T05:07:02.8166063Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8167156Z [05:07:02] 
2024-12-20T05:07:02.8167959Z [05:07:02] ld.lld: error: undefined symbol: mlir::LLVM::registerInlinerInterface(mlir::DialectRegistry&)
2024-12-20T05:07:02.8169235Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8170142Z [05:07:02] 
2024-12-20T05:07:02.8170786Z [05:07:02] ld.lld: error: undefined symbol: mlir::linalg::registerAllDialectInterfaceImplementations(mlir::DialectRegistry&)
2024-12-20T05:07:02.8172093Z [05:07:02] >>> referenced by tools/mlir/tools/mlir-rewrite/CMakeFiles/mlir-rewrite.dir/mlir-rewrite.cpp.obj:(mlir::registerAllDialects(mlir::DialectRegistry&))
2024-12-20T05:07:02.8172990Z [05:07:02] 
2024-12-20T05:07:02.8173484Z [05:07:02] ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
2024-12-20T05:07:02.8174411Z [05:07:02] clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
2024-12-20T05:07:03.0460234Z [05:07:03] clang-16: warning: argument unused during compilation: '-remap' [-Wunused-command-line-argument]
2024-12-20T05:07:04.9602702Z [05:07:04] clang-16: warning: argument unused during compilation: '-remap' [-Wunused-command-line-argument]
2024-12-20T05:07:04.9609854Z [05:07:04] ninja: subcommands failed
2024-12-20T05:07:04.9625243Z [05:07:04]  ---> ninja -j${nproc} -vv
2024-12-20T05:07:04.9626688Z [05:07:04]  ---> ninja -j${nproc} -vv
2024-12-20T05:07:04.9627958Z [05:07:04] Previous command exited with 1
2024-12-20T05:07:04.9833666Z [05:07:04] Child Process exited, exit code 1
2024-12-20T05:07:05.7477111Z ERROR: Build for LLVM_full_assert on x86_64-w64-mingw32-cxx11 did not complete successfully
```
Looks somewhat similar to https://github.com/llvm/llvm-project/issues/106859.

Anyways setting `DMLIR_LINK_MLIR_DYLIB=OFF` gets things working again.

https://github.com/llvm/llvm-project/pull/119408


More information about the Mlir-commits mailing list