Skip to content

Conversation

@Teemperor
Copy link
Contributor

This PR fixes the issue that we don't export macros from the loaded modules. See the specific commits for more.

@Teemperor Teemperor requested a review from vgvassilev November 28, 2017 08:52
@Teemperor Teemperor requested a review from pcanal as a code owner November 28, 2017 08:52
@Teemperor Teemperor changed the title Export macros from modules [cxxmodules] Export macros from modules Nov 28, 2017
@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu14/native, ubuntu14/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON
How to customize builds

@Teemperor
Copy link
Contributor Author

@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

Copy link
Member

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vgvassilev
Copy link
Member

@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

@vgvassilev
Copy link
Member

@phsft-bot build just on slc6/gcc52 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Didn't recognize slc6/gcc52 aborting build.

@vgvassilev
Copy link
Member

@phsft-bot build just on slc6/gcc62 with flags -Druntime_cxxmodules=On -Dctest_test_exclude_none=on

@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

// Let's follow the GCC recommendation and undefine `I` in case any of the
// core modules have defined it:
// https://www.gnu.org/software/libc/manual/html_node/Complex-Numbers.html
interp.declare("#ifdef I\n #undef I\n #endif\n");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vgvassilev I reply here to your comment on the closed PR. I don't think we call recursively LoadCoreModule or recursively make TCling instances? And if we do, then we already made a good portion of declares before this code for all the other TCling things, so we would anyway be in deep trouble.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we ought to reduce all declares in TCling and that seems to be an easy-to-reduce one.

@Teemperor Teemperor force-pushed the ExportMacrosFromModules branch from 52021b0 to dfe40dd Compare November 28, 2017 11:06
In clang there are two records of what modules are visible: One
VisibleModuleSet is in the preprocessor, one is in the sema. In
the current code we only make every core module visible in sema,
but no in the preprocessor. This causes that we can load decls
from the core modules with that, but we can't load macros from
them as they are still invisible in the preprocessor.

This patch just also makes the module visible in the preprocessor.
@phsft-bot
Copy link

Starting build on slc6/gcc62 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=On -Dctest_test_exclude_none=on
How to customize builds

In commit 1847320 we remove the code that undefs I
which breaks some tests since we now again export macros
from the STL module.
@phsft-bot
Copy link

Build failed on slc6/gcc62.
See console output.

Errors:

Warnings:

  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module Core:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module valarrayDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module setDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module listDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module vectorDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module multimap2Dict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multimapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_mapDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module dequeDict:
  • Warning in <GenerateModule>: warning: Couldn't find the following specified headers in the module unordered_multisetDict:

And 7 more

Failing tests:

And 53 more

@Teemperor
Copy link
Contributor Author

@phsft-bot build with flags -Druntime_cxxmodules=Off -Dctest_test_exclude_none=off

@phsft-bot
Copy link

Starting build on centos7/gcc49, mac1012/native, slc6/gcc49, slc6/gcc62, slc6/gcc62, ubuntu14/native, ubuntu14/native, windows10/vc15 with flags -Dvc=OFF -Dimt=ON -Dccache=ON -Druntime_cxxmodules=Off -Dctest_test_exclude_none=off
How to customize builds

@phsft-bot
Copy link

Build failed on mac1012/native.
See console output.

Failing tests:

@vgvassilev vgvassilev merged commit 5d451b1 into root-project:master Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants