[cfe-dev] JumboSupport: making unity builds easier in Clang
cfe-dev at lists.llvm.org
Fri Apr 27 05:35:22 PDT 2018
This assumes the exported interface for any header is directly defined in that header, not deferred to another implementation-detail header.
I have a vague memory that some C++ library interfaces are actually available via more than one header; possibly the stream stuff? If I'm wrong, fine; if I'm right, this approach still needs some fine tuning.
We also discussed how we could, in the long run, get the compile time benefits of jumbo builds without the semantic changes. The basic idea is that every "modular header", i.e. a header that can successfully parse by itself with only command line macros defined, could be its own module. Again, we're not talking about AST serialization, just changing name lookup rules. It's just a module for name lookup purposes. In order for this to work, all code needs to follow very strict include-what-you-use rules: transitive includes wouldn't be visible from indirect users of a header. Obviously, we are not in this world today, but it's one we could work towards.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev