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

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Fri Jun 2 09:25:09 PDT 2017


On Fri, Jun 2, 2017 at 12:36 AM Boris Kolpackov <boris at codesynthesis.com>
wrote:

> Hi David,
>
> David Blaikie <dblaikie at gmail.com> writes:
>
> > So could you outline (show a small/complete example with source,
> commands,
> > etc) what you're trying to do?
>
> In build2 (build system I am working on) we have the ability to specify
> that a source file is preprocessed to a certain degree. This is used to
> speed things up.


Does this actually speed up clang in an observable way?


> While currently having translation units that no longer
> require preprocessing is not very common, with modules (and modularized
> standard library) this situation will become a lot more plausible. So we
> want to be ready.
>

What makes it more likely for modularized code? In the sense that many more
source files won't /need/ to use the preprocessor, so they're sort of
quasi-preprocessed (trivially, in the sense that there's no work to do)
already?


>
> If the user says that certain TUs are fully preprocessed, then build2
> passes this information on to the compiler via the -x option. So for C
> we say the source is '-x cpp-output' and for C++ -- '-x c++-cpp-output'.
>
> Now in Clang module interface units have to be compiled as '-x c++-module',
> not '-x c++'. So we also need '-x c++-module-cpp-output'.
>
> BTW, it is not clear why c++-module is needed (and it is needed -- I tried
> to compile as just c++ and things didn't go well). Perhaps now that Clang
> use the 'export module M;' syntax c++-module is no longer necessary?
>
> Thanks,
> Boris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170602/c9f1ed5f/attachment.html>


More information about the cfe-dev mailing list