[cfe-dev] Language not recognized: 'c++-module-cpp-output'

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Sat Jun 3 10:59:05 PDT 2017


On Sat, Jun 3, 2017 at 7:07 AM Boris Kolpackov <boris at codesynthesis.com>
wrote:

> Richard Smith <richard at metafoo.co.uk> writes:
>
> > What difference are you expecting the -cpp-output to make to the
> > compilation?
>
> Make it a lot faster? ;-)
>
> Seriously, though, in my case I know that certain TU do not use the
> preprocessor. I do some optimizations at the build system level but
> also want to pass this information along to the compiler in case it
> wants to do some as well. It may not do any currently (e.g., because
> such preprocessed TU are virtually non-existent and its not worth the
> effort). But maybe it makes sense to "reserve" the name even if it's
> just an alias for 'c++-module'. But I am also happy to always pass
> 'c++-module' (and perhaps 'c++' for consistency).
>
> Also, on the topic of expectations: I assume that such a preprocessed
> TU can still contain comments and line continuations. Clang's -cpp-output
> handles this but not GCC's (where I use -fdirectives-only to indicate
> that the source is only partially preprocessed).
>

As an aside - Clang has -frewrite-includes that might be sufficiently
similar for your needs. If you don't use this (& use full preprocessing)
you will find that Clang's diagnostics differ between a preprocessed file
being compiled and an unpreprocessed file being compiled (Clang uses macro
information to decide whether to warn in some cases).


>
> Boris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170603/7e076e37/attachment.html>


More information about the cfe-dev mailing list