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

Boris Kolpackov via cfe-dev cfe-dev at lists.llvm.org
Fri Jun 2 00:36:14 PDT 2017


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. 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.

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



More information about the cfe-dev mailing list