-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[cxxmodules] Also load STL/libc as a core module #1317
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
Conversation
|
Starting build on |
|
@phsft-bot build with flags -Druntime_cxxmodules=On |
|
Starting build on |
|
Build failed on mac1012/native. |
|
Build failed on centos7/gcc49. Warnings:
And 7 more Failing tests:
And 82 more |
|
Build failed on slc6/gcc62. Warnings:
And 7 more Failing tests:
And 83 more |
|
Build failed on slc6/gcc62. Warnings:
And 7 more Failing tests:
And 79 more |
|
Build failed on ubuntu14/native. Warnings:
And 7 more Failing tests:
And 86 more |
|
Build failed on slc6/gcc49. Warnings:
And 7 more Failing tests:
And 83 more |
core/metacling/src/TCling.cxx
Outdated
| clang::ModuleMap &moduleMap = headerSearch.getModuleMap(); | ||
| // List of core modules we need to load. | ||
| std::vector<std::string> neededCoreModuleNames = {"Core", "RIO"}; | ||
| std::vector<std::string> neededCoreModuleNames = {"Core", "RIO", "stl", "libc"}; |
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.
Perhaps we should load them in the reverse order, i.e. starting from libc. However, we might want to start by loading stl first because that would avoid eager deserialization of lazy specializations.
889be35 to
6b6fe6c
Compare
|
Starting build on |
|
Build failed on mac1012/native. |
|
Build failed on slc6/gcc62. Warnings:
And 7 more Failing tests:
And 74 more |
|
Build failed on centos7/gcc49. Warnings:
And 7 more Failing tests:
And 78 more |
|
Build failed on slc6/gcc62. Warnings:
And 7 more Failing tests:
And 81 more |
|
Build failed on slc6/gcc49. Warnings:
And 7 more Failing tests:
And 79 more |
|
Build failed on ubuntu14/native. Warnings:
And 7 more Failing tests:
And 82 more |
|
Build failed on ubuntu14/native. Warnings:
And 7 more Failing tests:
And 78 more |
|
@phsft-bot build with flags -Druntime_cxxmodules=Off |
|
Starting build on |
6b6fe6c to
5bfe855
Compare
|
Starting build on |
Without modules, many STL and libc headers are automatically
provided by ROOT via the attached ROOT PCH. This means that
we don't need to have autloading or explicit includes for STL
or libc headers when running with the PCH attached. This leads
to making user code like this working in ROOT:
```C++
// no includes here that provides assert
int foo() {
assert(false);
}
```
However, as the modules don't come with this big PCH, we
are now suddenly in the situation where we can't resolve
things such as `assert`. We also can't rely on the
normal autoloading of ROOT as those declarations were
actually never autoloaded, but just provided by the PCH.
To simulate this behavior with modules, we automatically load
those headers that we expect to have in the ROOT PCH
(which are probably the STL and libc headers).
If we preload the core modules that can contain complex.h, we break a lot of tests that name variables or template arguments I.
|
Starting build on |
|
@phsft-bot build with flags -Druntime_cxxmodules=On |
|
Starting build on |
|
Build failed on mac1012/native. Errors:
And 10 more |
|
Build failed on slc6/gcc62. Warnings:
And 7 more Failing tests:
And 38 more |
|
Build failed on centos7/gcc49. Warnings:
And 7 more Failing tests:
And 37 more |
|
@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=On |
|
Starting build on |
|
Build failed on slc6/gcc62. Errors:
And 15 more Warnings:
And 7 more Failing tests:
And 80 more |
Without modules, many STL and libc headers are automatically
provided by ROOT via the attached ROOT PCH. This means that
we don't need to have autloading or explicit includes for STL
or libc headers when running with the PCH attached. This leads
to making user code like this working in ROOT:
However, as the modules don't come with this big PCH, we
are now suddenly in the situation where we can't resolve
things such as
assert. We also can't rely on thenormal autoloading of ROOT as those declarations were
actually never autoloaded, but just provided by the PCH.
To simulate this behavior with modules, we automatically load
those headers that we expect to have in the ROOT PCH
(which are probably the STL and libc headers).