-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[rootcling] Remove llvm::cl dependency by using ROOT's optparse
#20903
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
base: master
Are you sure you want to change the base?
Conversation
Test Results 22 files 22 suites 3d 10h 32m 2s ⏱️ For more details on these failures, see this check. Results for commit 195fcf1. ♻️ This comment has been updated with latest results. |
c585da4 to
eb694e6
Compare
|
Note: clearly if we want to use |
Yes, it would be nice to have the header somewhere in |
|
For future reference, this is the reverse direction of #4171 |
eb694e6 to
5611b06
Compare
This would potentially remove issues like ``` CommandLine Error: Option 'W' registered more than once! ``` caused by `llvm::cl` registering the same options multiple times when ROOT is linked against a shared `libLLVM`.
|
I just tested removing all |
5611b06 to
ccb43c6
Compare
This replaces many usages of `shortflags` with multiple characters whenever possible. Some flags are omitted (e.g., `-writeEmptyRootPCM`) as they cause the diff to be huge and can go in a separate PR.
ccb43c6 to
195fcf1
Compare
|
I am not sure what is the merit of going this direction. If we want to avoid the assert, it is rather a symptom rather than an issue. That is, when we see the assert we almost certainly have screwed up the setup of the llvm linking. |
The goal here is to make this a non-screwup and allow linking against the |
Yes, and that would cause symbols to clash when dlopening libraries in libCling that bring their own copy of llvm. Of course that assertion won’t fire however later when you deploy root it would cause issues. We’ve been discussing this over many years and there doesn’t seem to be a reasonable way forward. That’s why I wonder if it’s worth revisiting this topic rather than actually fixing llvm to not link libLLVM.so when we request static linking. |
When building against an external LLVM, the user tells us (more or less) that they don't care about symbol clashes. Otherwise they would use |
Yes, but what is the end goal? You can't do what you are doing for rootcling to libCling, right? If you do the same strategy you can't load things like libmessa which ships its own llvm. |
I don't understand this question, what does "rootcling to libCling" mean?
I don't see this being the case: |
What if they are different which is usually the case? Also, some distributions statically linked llvm in messa and who knows what else. I think going in this direction will cause a lot of pain for us because we don't know what the users are going to ask ROOT to |
This Pull request:
This is a draft PR to test if it is possible to use optparse in rootcling:
bareclingsubcommand makes this slightly complicated, but not sure if it is worth adding subcommand feature to optparse.This patch potentially removes issues like
caused by
llvm::clregistering the same options multiple times when ROOT is linked against a sharedlibLLVM.(See: #12156)
Changes or fixes:
Checklist:
This PR fixes #