-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Additional patch to Clangs CMake code is required in case LLVM was built with LLVM_LINK_LLVM_DYLIB=ON
#18387
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
Comments
Some more context for the curious: I have made my custom I'm also intending to upstream this patched Clang to nix packages with the upcoming ROOT release: |
LLVM_LINK_LLVM_DYLIB=ON
LLVM_LINK_LLVM_DYLIB=ON
Related hurdle: #17209 (comment) |
This is only a problem in ROOT: #12156, standalone cling should be unaffected (dynamic LLVM). I'm not very in favor for a patch to our LLVM fork as we’re actively trying to reduce such patches. It would be better if we can handle this from cling/ROOT side. Ideally, ROOT should also build with |
Hi @devajithvs, well if you can fix it on the ROOT side that would of course be great. However, I think that this is maybe an Clang problem and not necessarily a ROOT problem. Here are the relevant two commits in LLVM: The commit message of the second linked commit says:
In our example, Clang is the out-of-tree client, and I don't see the reason why it should not be possible to configure it to use the non-default value of Also, probably you are familiar with this discussion already, but doesn't hurt to link it again: |
Note that besides CMake things, this might not be desirable as this may leads to symbols leaking and/or conflicting with other package (OpenGL things, etc) that also use LLVM. |
Correct. I have made a suggestion upstream, let's see what people say! |
I would be even stronger here:
If that works, that's fine with me. Note that we link all libraries into
For future reference: The first problem encountered is that |
This is only for |
I don't think we can afford this stance. The
I don't understand why this is related: the user might want to build with |
Description
Additional patches to Clangs CMake code are required in case LLVM was built with
LLVM_LINK_LLVM_DYLIB=ON
, similar to the patches that were done in ROOT here:builtin_clang=OFF
#18386Where should this patch go? Would it be reasonable to do it in our fork of LLVM and then sync ROOT with it?
https://github.com/root-project/llvm-project
@hahnjo, your advice would be very appreciated here!
Reproducer
LLVM_LINK_LLVM_DYLIB=ON
(usually the case for the system packages)builtin_llvm=OFF
andbuiltin_clang=OFF
Only with the patch in the Clang CMakeLists.txt, it works for me.
Additional context
See also this issue for some context on why it is necessary to statically link against LLVM:
The text was updated successfully, but these errors were encountered: