[Tooling] [isocpp-modules] Round2: Path to modules with old bad build systems

Boris Kolpackov boris at codesynthesis.com
Wed Mar 6 15:34:58 CET 2019


Ben Boeckel <ben.boeckel at kitware.com> writes:

> On Tue, Mar 05, 2019 at 15:47:16 -0500, Mathias Stearn wrote:
>
> > [1] Currently, with gcc and clang, you need to "partially preprocess" using
> > -fdirectives-only or -frewrite-includes because those tools behave
> > differently when compiling TUs that have already been fully preprocessed. I
> > haven't tried doing a similar experiment with MSVC to know how well it
> > handles fully preprocessed files.
> 
> There was discussion of this on Reddit a while ago:
> 
>     https://www.reddit.com/r/cpp/comments/6abi99/rfc_issues_with_separate_preprocess_and_compile/

Since posting that RFC we have switch to the separate preprocessing and
compilation model, with partial preprocessing for GCC and Clang and (for
now) full preprocessing for MSVC. This is the default (we do have a way
to force re-processing) for all projects, modular or not. So far we have
seen surprisingly few issues (one, to be exact, in chaiscript that uses
raw string literals) with the fully preprocessed output for MSVC.

I am also told that Microsoft is working on a new preprocessor and I have
asked Gaby & others to consider supporting something similar to
-fdirectives-only or -frewrite-includes.


More information about the Tooling mailing list