C++ Logo

sg15

Advanced search

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

From: Boris Kolpackov <boris_at_[hidden]>
Date: Wed, 6 Mar 2019 16:34:58 +0200
Ben Boeckel <ben.boeckel_at_[hidden]> 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.

Received on 2019-03-06 15:35:03