Skip to content

[mlir] Link libraries that aren't included in libMLIR to libMLIR #123477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

mgorny
Copy link
Member

@mgorny mgorny commented Jan 18, 2025

Use mlir_target_link_libraries() to link dependencies of libraries that are not included in libMLIR, to ensure that they link to the dylib when they are used in Flang. Otherwise, they implicitly pull in all their static dependencies, effectively causing Flang binaries to simultaneously link to the dylib and to static libraries, which is never a good idea.

I have only covered the libraries that are used by Flang. If you wish, I can extend this approach to all non-libMLIR libraries in MLIR, making MLIR itself also link to the dylib consistently.

@llvmbot
Copy link
Member

llvmbot commented Jan 18, 2025

@llvm/pr-subscribers-mlir-sparse
@llvm/pr-subscribers-mlir-tensor
@llvm/pr-subscribers-mlir-gpu
@llvm/pr-subscribers-mlir-spirv
@llvm/pr-subscribers-mlir-core
@llvm/pr-subscribers-mlir-scf
@llvm/pr-subscribers-mlir-sme
@llvm/pr-subscribers-mlir-shape
@llvm/pr-subscribers-mlir-execution-engine
@llvm/pr-subscribers-mlir-func
@llvm/pr-subscribers-mlir-tosa
@llvm/pr-subscribers-mlir-affine

@llvm/pr-subscribers-mlir

Author: Michał Górny (mgorny)

Changes

Use mlir_target_link_libraries() to link dependencies of libraries that are not included in libMLIR, to ensure that they link to the dylib when they are used in Flang. Otherwise, they implicitly pull in all their static dependencies, effectively causing Flang binaries to simultaneously link to the dylib and to static libraries, which is never a good idea.

I have only covered the libraries that are used by Flang. If you wish, I can extend this approach to all non-libMLIR libraries in MLIR, making MLIR itself also link to the dylib consistently.


Full diff: https://github.com/llvm/llvm-project/pull/123477.diff

3 Files Affected:

  • (modified) mlir/test/lib/Analysis/CMakeLists.txt (+7-1)
  • (modified) mlir/test/lib/Dialect/Test/CMakeLists.txt (+5-1)
  • (modified) mlir/test/lib/IR/CMakeLists.txt (+5-1)
diff --git a/mlir/test/lib/Analysis/CMakeLists.txt b/mlir/test/lib/Analysis/CMakeLists.txt
index 7c6b31ae8b73e5..8135d22d1f7baa 100644
--- a/mlir/test/lib/Analysis/CMakeLists.txt
+++ b/mlir/test/lib/Analysis/CMakeLists.txt
@@ -21,12 +21,18 @@ add_mlir_library(MLIRTestAnalysis
   EXCLUDE_FROM_LIBMLIR
 
   LINK_LIBS PUBLIC
+  MLIRTestDialect
+  )
+
+# Since this library is excluded from libMLIR, link it to the dylib
+# to ensure that it can be used in flang without implicitly pulling in
+# static libraries.
+mlir_target_link_libraries(MLIRTestAnalysis PUBLIC
   MLIRAffineDialect
   MLIRAnalysis
   MLIRFunctionInterfaces
   MLIRMemRefDialect
   MLIRPass
-  MLIRTestDialect
   )
 
 target_include_directories(MLIRTestAnalysis
diff --git a/mlir/test/lib/Dialect/Test/CMakeLists.txt b/mlir/test/lib/Dialect/Test/CMakeLists.txt
index 967101242e26b5..aebf4724be34e9 100644
--- a/mlir/test/lib/Dialect/Test/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/Test/CMakeLists.txt
@@ -68,8 +68,12 @@ add_mlir_library(MLIRTestDialect
   MLIRTestOpsIncGen
   MLIRTestOpsSyntaxIncGen
   MLIRTestOpsShardGen
+  )
 
-  LINK_LIBS PUBLIC
+# Since this library is excluded from libMLIR, link it to the dylib
+# to ensure that it can be used in flang without implicitly pulling in
+# static libraries.
+mlir_target_link_libraries(MLIRTestDialect PUBLIC
   MLIRControlFlowInterfaces
   MLIRDataLayoutInterfaces
   MLIRDerivedAttributeOpInterface
diff --git a/mlir/test/lib/IR/CMakeLists.txt b/mlir/test/lib/IR/CMakeLists.txt
index 01297ad0a11482..09e370007a424e 100644
--- a/mlir/test/lib/IR/CMakeLists.txt
+++ b/mlir/test/lib/IR/CMakeLists.txt
@@ -27,8 +27,12 @@ add_mlir_library(MLIRTestIR
   TestVisitorsGeneric.cpp
 
   EXCLUDE_FROM_LIBMLIR
+  )
 
-  LINK_LIBS PUBLIC
+# Since this library is excluded from libMLIR, link it to the dylib
+# to ensure that it can be used in flang without implicitly pulling in
+# static libraries.
+mlir_target_link_libraries(MLIRTestIR PUBLIC
   MLIRPass
   MLIRBytecodeReader
   MLIRBytecodeWriter

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, thanks.

I have only covered the libraries that are used by Flang. If you wish, I can extend this approach to all non-libMLIR libraries in MLIR, making MLIR itself also link to the dylib consistently.

Yes, we should do this for everything.

Use `mlir_target_link_libraries()` to link dependencies of libraries
that are not included in libMLIR, to ensure that they link to the dylib
when they are used in Flang.  Otherwise, they implicitly pull in all
their static dependencies, effectively causing Flang binaries to
simultaneously link to the dylib and to static libraries, which is never
a good idea.

I have only covered the libraries that are used by Flang.  If you wish,
I can extend this approach to all non-libMLIR libraries in MLIR, making
MLIR itself also link to the dylib consistently.
Hopefully I didn't mess anything up.  The tests build and pass for me
(except for these that failed already) both with MLIR_LINK_MLIR_DYLIB
and without.
@mgorny
Copy link
Member Author

mgorny commented Jan 19, 2025

Rebased and updated for all the libs.

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mgorny mgorny merged commit af66166 into llvm:main Jan 20, 2025
8 checks passed
@mgorny mgorny deleted the mlir-test-lib-dylib-link branch January 20, 2025 17:25
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 20, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-libcxx running on linaro-flang-aarch64-libcxx while building mlir at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/89/builds/14755

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
47.853 [2425/23/4896] Building CXX object tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestOps.2.cpp.o
47.853 [2425/22/4897] Creating library symlink lib/libMLIRTestMathToVCIX.so
47.853 [2425/21/4898] Creating library symlink lib/libMLIRArithTestPasses.so
47.854 [2425/20/4899] Creating library symlink lib/libMLIRBufferizationTestPasses.so
47.854 [2425/19/4900] Creating library symlink lib/libMLIRControlFlowTestPasses.so
47.854 [2425/18/4901] Creating library symlink lib/libMLIRMathTestPasses.so
47.879 [2425/17/4902] Building CXX object tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestOps.3.cpp.o
47.994 [2425/16/4903] Linking CXX shared library lib/libMLIRComplexToSPIRV.so.20.0git
48.038 [2425/15/4904] Linking CXX shared library lib/libMLIRUBToSPIRV.so.20.0git
48.042 [2425/14/4905] Linking CXX shared library lib/libMLIRCAPIExecutionEngine.so.20.0git
FAILED: lib/libMLIRCAPIExecutionEngine.so.20.0git 
: && /usr/local/bin/c++ -fPIC -stdlib=libc++ -fPIC -fno-semantic-interposition -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 -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O3 -DNDEBUG  -stdlib=libc++ -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libMLIRCAPIExecutionEngine.so.20.0git -o lib/libMLIRCAPIExecutionEngine.so.20.0git tools/mlir/lib/CAPI/ExecutionEngine/CMakeFiles/obj.MLIRCAPIExecutionEngine.dir/ExecutionEngine.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/lib:"  lib/libMLIRExecutionEngine.so.20.0git  lib/libMLIRLLVMToLLVMIRTranslation.so.20.0git  lib/libLLVMAArch64CodeGen.so.20.0git  lib/libLLVMAArch64AsmParser.so.20.0git  lib/libLLVMAArch64Disassembler.so.20.0git  lib/libMLIRBuiltinToLLVMIRTranslation.so.20.0git  lib/libMLIRExecutionEngineUtils.so.20.0git  lib/libMLIROpenMPToLLVMIRTranslation.so.20.0git  lib/libMLIRTargetLLVMIRExport.so.20.0git  lib/libMLIRDLTIDialect.so.20.0git  lib/libMLIRLLVMIRTransforms.so.20.0git  lib/libMLIRTransforms.so.20.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.20.0git  lib/libMLIRNVVMDialect.so.20.0git  lib/libMLIRTranslateLib.so.20.0git  lib/libMLIRParser.so.20.0git  lib/libMLIRBytecodeReader.so.20.0git  lib/libMLIRAsmParser.so.20.0git  lib/libMLIRTransformUtils.so.20.0git  lib/libMLIRSubsetOpInterface.so.20.0git  lib/libMLIRValueBoundsOpInterface.so.20.0git  lib/libMLIRDestinationStyleOpInterface.so.20.0git  lib/libMLIRRewrite.so.20.0git  lib/libMLIRRewritePDL.so.20.0git  lib/libMLIRPDLToPDLInterp.so.20.0git  lib/libMLIRPass.so.20.0git  lib/libMLIRAnalysis.so.20.0git  lib/libMLIRLoopLikeInterface.so.20.0git  lib/libMLIRInferIntRangeInterface.so.20.0git  lib/libMLIRPresburger.so.20.0git  lib/libMLIRViewLikeInterface.so.20.0git  lib/libMLIRPDLInterpDialect.so.20.0git  lib/libMLIRPDLDialect.so.20.0git  lib/libMLIROpenMPDialect.so.20.0git  lib/libMLIRLLVMDialect.so.20.0git  lib/libMLIRDataLayoutInterfaces.so.20.0git  lib/libMLIRMemorySlotInterfaces.so.20.0git  lib/libMLIRFuncDialect.so.20.0git  lib/libMLIRCallInterfaces.so.20.0git  lib/libMLIRControlFlowInterfaces.so.20.0git  lib/libMLIRFunctionInterfaces.so.20.0git  lib/libMLIRInferTypeOpInterface.so.20.0git  lib/libMLIRSideEffectInterfaces.so.20.0git  lib/libMLIROpenACCMPCommon.so.20.0git  lib/libMLIRIR.so.20.0git  lib/libMLIRSupport.so.20.0git  lib/libLLVMFrontendOpenMP.so.20.0git  lib/libLLVMBitWriter.so.20.0git  lib/libLLVMTransformUtils.so.20.0git  lib/libLLVMAsmParser.so.20.0git  lib/libLLVMBitReader.so.20.0git  lib/libLLVMAArch64Desc.so.20.0git  lib/libLLVMAArch64Info.so.20.0git  lib/libLLVMAArch64Utils.so.20.0git  lib/libLLVMCore.so.20.0git  lib/libLLVMBinaryFormat.so.20.0git  lib/libLLVMTargetParser.so.20.0git  lib/libLLVMSupport.so.20.0git  -Wl,-rpath-link,/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/lib && :
/usr/bin/ld: tools/mlir/lib/CAPI/ExecutionEngine/CMakeFiles/obj.MLIRCAPIExecutionEngine.dir/ExecutionEngine.cpp.o: in function `mlirExecutionEngineCreate':
ExecutionEngine.cpp:(.text.mlirExecutionEngineCreate+0x68): undefined reference to `llvm::orc::JITTargetMachineBuilder::detectHost()'
/usr/bin/ld: ExecutionEngine.cpp:(.text.mlirExecutionEngineCreate+0x90): undefined reference to `llvm::orc::JITTargetMachineBuilder::createTargetMachine()'
/usr/bin/ld: tools/mlir/lib/CAPI/ExecutionEngine/CMakeFiles/obj.MLIRCAPIExecutionEngine.dir/ExecutionEngine.cpp.o: in function `llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr, void>, llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef> > llvm::function_ref<llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr, void>, llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef> > (llvm::orc::MangleAndInterner)>::callback_fn<mlirExecutionEngineRegisterSymbol::$_0>(long, llvm::orc::MangleAndInterner)':
ExecutionEngine.cpp:(.text._ZN4llvm12function_refIFNS_8DenseMapINS_3orc15SymbolStringPtrENS2_17ExecutorSymbolDefENS_12DenseMapInfoIS3_vEENS_6detail12DenseMapPairIS3_S4_EEEENS2_17MangleAndInternerEEE11callback_fnIZ33mlirExecutionEngineRegisterSymbolE3$_0EESA_lSB_+0x40): undefined reference to `llvm::orc::MangleAndInterner::operator()(llvm::StringRef)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
48.047 [2425/13/4906] Linking CXX shared library lib/libMLIRControlFlowToSPIRV.so.20.0git
48.064 [2425/12/4907] Linking CXX shared library lib/libMLIRMathToSPIRV.so.20.0git
48.070 [2425/11/4908] Linking CXX shared library lib/libMLIRTestConvertToSPIRV.so.20.0git
48.074 [2425/10/4909] Linking CXX shared library lib/libMLIRSPIRVTransforms.so.20.0git
48.086 [2425/9/4910] Linking CXX shared library lib/libMLIRSCFTransforms.so.20.0git
48.088 [2425/8/4911] Linking CXX shared library lib/libMLIRMemRefToSPIRV.so.20.0git
48.090 [2425/7/4912] Linking CXX shared library lib/libMLIRVectorToSPIRV.so.20.0git
48.092 [2425/6/4913] Linking CXX shared library lib/libMLIRIndexToSPIRV.so.20.0git
48.095 [2425/5/4914] Linking CXX shared library lib/libMLIRVectorToLLVMPass.so.20.0git
48.111 [2425/4/4915] Linking CXX shared library lib/libMLIRNVGPUTestPasses.so.20.0git
48.124 [2425/3/4916] Linking CXX shared library lib/libMLIRTensorTransformOps.so.20.0git
48.142 [2425/2/4917] Linking CXX shared library lib/libMLIRVectorTransformOps.so.20.0git
48.166 [2425/1/4918] Linking CXX shared library lib/libMLIRFuncToSPIRV.so.20.0git
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 20, 2025

LLVM Buildbot has detected a new failure on builder mlir-nvidia running on mlir-nvidia while building mlir at step 6 "build-check-mlir-build-only".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/138/builds/9138

Here is the relevant piece of the build log for the reference
Step 6 (build-check-mlir-build-only) failure: build (failure)
...
31.832 [93/2/4969] Creating library symlink lib/libLLVMX86CodeGen.so
31.892 [90/4/4970] Linking CXX shared library lib/libMLIRNVVMTarget.so.20.0git
31.898 [89/4/4971] Creating library symlink lib/libMLIRNVVMTarget.so
31.932 [88/4/4972] Linking CXX executable bin/lli
31.933 [88/3/4973] Linking CXX executable bin/llc
31.942 [88/2/4974] Linking CXX shared library lib/libMLIRExecutionEngine.so.20.0git
31.948 [87/2/4975] Creating library symlink lib/libMLIRExecutionEngine.so
32.027 [86/2/4976] Linking CXX shared library lib/libMLIRGPUTransforms.so.20.0git
32.033 [85/2/4977] Creating library symlink lib/libMLIRGPUTransforms.so
32.043 [82/4/4978] Linking CXX shared library lib/libMLIRCAPIExecutionEngine.so.20.0git
FAILED: lib/libMLIRCAPIExecutionEngine.so.20.0git 
: && /usr/bin/clang++ -fPIC -fPIC -fno-semantic-interposition -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 -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--gc-sections -shared -Wl,-soname,libMLIRCAPIExecutionEngine.so.20.0git -o lib/libMLIRCAPIExecutionEngine.so.20.0git tools/mlir/lib/CAPI/ExecutionEngine/CMakeFiles/obj.MLIRCAPIExecutionEngine.dir/ExecutionEngine.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/lib:"  lib/libMLIRExecutionEngine.so.20.0git  lib/libMLIRLLVMToLLVMIRTranslation.so.20.0git  lib/libLLVMX86CodeGen.so.20.0git  lib/libLLVMX86AsmParser.so.20.0git  lib/libLLVMX86Desc.so.20.0git  lib/libLLVMX86Disassembler.so.20.0git  lib/libLLVMX86Info.so.20.0git  lib/libMLIRBuiltinToLLVMIRTranslation.so.20.0git  lib/libMLIRExecutionEngineUtils.so.20.0git  lib/libMLIROpenMPToLLVMIRTranslation.so.20.0git  lib/libMLIRTargetLLVMIRExport.so.20.0git  lib/libMLIRDLTIDialect.so.20.0git  lib/libMLIRLLVMIRTransforms.so.20.0git  lib/libMLIRTransforms.so.20.0git  lib/libMLIRRuntimeVerifiableOpInterface.so.20.0git  lib/libMLIRNVVMDialect.so.20.0git  lib/libMLIRTranslateLib.so.20.0git  lib/libMLIRParser.so.20.0git  lib/libMLIRBytecodeReader.so.20.0git  lib/libMLIRAsmParser.so.20.0git  lib/libMLIRTransformUtils.so.20.0git  lib/libMLIRSubsetOpInterface.so.20.0git  lib/libMLIRValueBoundsOpInterface.so.20.0git  lib/libMLIRDestinationStyleOpInterface.so.20.0git  lib/libMLIRRewrite.so.20.0git  lib/libMLIRRewritePDL.so.20.0git  lib/libMLIRPDLToPDLInterp.so.20.0git  lib/libMLIRPass.so.20.0git  lib/libMLIRAnalysis.so.20.0git  lib/libMLIRLoopLikeInterface.so.20.0git  lib/libMLIRInferIntRangeInterface.so.20.0git  lib/libMLIRPresburger.so.20.0git  lib/libMLIRViewLikeInterface.so.20.0git  lib/libMLIRPDLInterpDialect.so.20.0git  lib/libMLIRPDLDialect.so.20.0git  lib/libMLIROpenMPDialect.so.20.0git  lib/libMLIRLLVMDialect.so.20.0git  lib/libMLIRDataLayoutInterfaces.so.20.0git  lib/libMLIRMemorySlotInterfaces.so.20.0git  lib/libMLIRFuncDialect.so.20.0git  lib/libMLIRCallInterfaces.so.20.0git  lib/libMLIRControlFlowInterfaces.so.20.0git  lib/libMLIRFunctionInterfaces.so.20.0git  lib/libMLIRInferTypeOpInterface.so.20.0git  lib/libMLIRSideEffectInterfaces.so.20.0git  lib/libMLIROpenACCMPCommon.so.20.0git  lib/libMLIRIR.so.20.0git  lib/libMLIRSupport.so.20.0git  lib/libLLVMFrontendOpenMP.so.20.0git  lib/libLLVMBitWriter.so.20.0git  lib/libLLVMTransformUtils.so.20.0git  lib/libLLVMAsmParser.so.20.0git  lib/libLLVMBitReader.so.20.0git  lib/libLLVMCore.so.20.0git  lib/libLLVMBinaryFormat.so.20.0git  lib/libLLVMTargetParser.so.20.0git  lib/libLLVMSupport.so.20.0git  -Wl,-rpath-link,/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/lib && :
ld.lld: error: undefined symbol: llvm::orc::JITTargetMachineBuilder::detectHost()
>>> referenced by ExecutionEngine.cpp
>>>               tools/mlir/lib/CAPI/ExecutionEngine/CMakeFiles/obj.MLIRCAPIExecutionEngine.dir/ExecutionEngine.cpp.o:(mlirExecutionEngineCreate)

ld.lld: error: undefined symbol: llvm::orc::JITTargetMachineBuilder::createTargetMachine()
>>> referenced by ExecutionEngine.cpp
>>>               tools/mlir/lib/CAPI/ExecutionEngine/CMakeFiles/obj.MLIRCAPIExecutionEngine.dir/ExecutionEngine.cpp.o:(mlirExecutionEngineCreate)

ld.lld: error: undefined symbol: llvm::orc::MangleAndInterner::operator()(llvm::StringRef)
>>> referenced by ExecutionEngine.cpp
>>>               tools/mlir/lib/CAPI/ExecutionEngine/CMakeFiles/obj.MLIRCAPIExecutionEngine.dir/ExecutionEngine.cpp.o:(llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr, void>, llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef> > llvm::function_ref<llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr, void>, llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::orc::ExecutorSymbolDef> > (llvm::orc::MangleAndInterner)>::callback_fn<mlirExecutionEngineRegisterSymbol::$_1>(long, llvm::orc::MangleAndInterner))
clang: error: linker command failed with exit code 1 (use -v to see invocation)
32.150 [82/3/4979] Linking CXX shared library lib/libMLIRSCFToGPU.so.20.0git
32.159 [82/2/4980] Linking CXX shared library lib/libMLIRLinalgTestPasses.so.20.0git
32.169 [82/1/4981] Linking CXX shared library lib/libMLIRGPUToGPURuntimeTransforms.so.20.0git
ninja: build stopped: subcommand failed.

@mgorny
Copy link
Member Author

mgorny commented Jan 20, 2025

Looks like I broke BUILD_SHARED_LIBS=ON. I'll revert and try to reproduce locally.

mgorny added a commit that referenced this pull request Jan 20, 2025
…LIR (#123477)"

This reverts commit af66166.  It broke
builds with `-DBUILD_SHARED_LIBS=ON`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants