-
Notifications
You must be signed in to change notification settings - Fork 104
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
error when linking against LLDEnzymeFlags CMake target #1389
Comments
That is strange since we do test LLDEnzymeFlags https://github.com/EnzymeAD/Enzyme/blob/main/enzyme/test/test_find_package/CMakeLists.txt |
here's the complete invocation:
|
Is it possible that ld64 does not support LLVM plugins? |
It appears the answer is no: https://github.com/llvm/llvm-project/blob/b63c6e585d8662b67b38988f0cd38a0bd6e0d38a/lld/ELF/Options.td#L765 cc @jdoerfert |
ld64 != lld |
I would try something like: |
Yeah though the actual LLVM linker only has support for plugins inside the ELF subcomponent itself, and not the MachO (macOS) subcomponent, so there is no support for plugins. Recompiling LLVM won't add support, its a feature that needs to be added to upstream LLVM. |
The old pass manager pipeline exists across all versions, but the new pass manager only exists for ELF. |
odd. Thought we were using system ld64. Even more odd that ld64.lld does not support plugins. |
@samuelpmishLLNL can you make an issue on LLVM proper to have lld support plugins on macOS? |
This is weird, I could have sworn I was using LLDEnzyme on my mac earlier. edit: ah, maybe I was using the old pass manager previously?
-fuse-ld=lld was in the command, and it was using the lld built with LLVM.
Sure, I'll go make the issue but I might have to defer to you guys for clarification. |
Follow up: are you guys able to reproduce the LLDEnzyme error message on macs? |
When linking a library/executable against
LLDEnzymeFlags
:The link line is producing an error message (this is from a mac build):
The path in the error message does point to the right shared library, did the method of loading the plugin change? This is from LLVM/clang 16, built with
CMAKE_ARGS -DLLVM_TARGETS_TO_BUILD:STRING=host -DLLVM_ENABLE_PROJECTS:STRING=clang|clang-tools-extra|lld -DLLVM_ENABLE_PLUGINS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PLUGINS=ON -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_RUNTIMES:STRING=libcxx|libcxxabi -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_SOURCE_DIR}/build -DDEFAULT_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
The text was updated successfully, but these errors were encountered: