-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[cxxmodules] Only load modules if one was generated #1511
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
[cxxmodules] Only load modules if one was generated #1511
Conversation
|
Starting build on |
|
This commit is part of #1394 and I want to get it in while the rest of the other PR is being worked on. |
|
Build failed on slc6/gcc62. Errors:
|
|
Build failed on mac1012/native. Errors:
|
Axel-Naumann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a cxx module was generated but cannot be loaded - is that a severe issue? Or is the module optional?
If it's optional, should we just try to load it and fail gracefully if it's not installed? But maybe that's the cause of a perf issue that's hard to track down?
Anyway - thank you so much for providing this patch!
| " TROOT::RegisterModule(\"" << GetDemangledDictionaryName() << "\",\n" | ||
| " headers, includePaths, payloadCode, fwdDeclCode,\n" | ||
| " TriggerDictionaryInitialization_" << GetDictionaryName() << "_Impl, " << fwdDeclnArgsToKeepString << ", classesHeaders);\n" | ||
| " TriggerDictionaryInitialization_" << GetDictionaryName() << "_Impl, " << fwdDeclnArgsToKeepString << ", classesHeaders, " << (fCI->getLangOpts().Modules ? "/*has C++ module*/true" : "/*has no C++ module*/false") << ");\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make that , /*hasCxxModule*/" << (fCI->getLangOpts().Modules ? "true" : "false")?
/*has no C++ module*/ false sounds like a double negation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
|
@phsft-bot build! |
|
Starting build on |
If we generate a dictionary with a C++ module with rootcling we should write in the payload that we generated a C++ module. This way we can actually print a *reliable* warning when we fail to load the C++ module during runtime. Without this we can only speculate if a missing C++ module is intentional.
5d835cc to
4900610
Compare
|
Starting build on |
|
@Axel-Naumann Shouldn't matter (beside performance) at the moment if a module can't be loaded. So far we only print a message to inform that our loading setup is still wrong and then continue. |
|
@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on |
|
Starting build on |
|
@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on |
|
Starting build on |
|
@phsft-bot build just on centos7/gcc7 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on |
|
Starting build on |
|
Build failed on centos7/gcc7. Errors:
Failing tests:
And 25 more |
|
Ok, Jenkins passed without modules and with modules we have no regressions it seems, so merging. |
If we generate a dictionary with a C++ module with rootcling we
should write in the payload that we generated a C++ module.
This way we can actually print a reliable warning when we fail
to load the C++ module during runtime. Without this we can only
speculate if a missing C++ module is intentional.