[Tooling] Clang Modules and build system requirements
Mathias Stearn
redbeard0531 at gmail.com
Fri Feb 8 06:58:38 CET 2019
On Fri, Feb 8, 2019 at 12:33 AM Tom Honermann <tom at honermann.net> wrote:
> A couple of people have countered that build system updates are required
> (presumably in excess of just adding '-fmodules' to Clang invocations) in
> order to enable support for Clang Modules. This seems trivially incorrect
> to me, so long as one does not consider Clang's module.modulemap files to
> be part of the build system (I don't; they are tool specific configuration
> files that the build system does not need to be aware of).
>
I would hope you are marking the module.modulemap as an input dependency of
every compilation that uses -fmodules. If you don't then you are risking
silent miscompilation which is about the worst thing a build system can do.
And if you are, that means that you have either manually added it as an
input edge to every compile (unlikely), or you modified your build system
to teach it to do that automatically*. I assume you are primarily referring
to deeper structural changes, but your implication that you can just add
-fmodules to CXXFLAGS and walk away seems trivially incorrect to me.
*Technically there is an additional option: your build system monitors for
every file that the compiler opens (eg by LDPRELOAD) and automatically adds
the modulemap file as an input edge. But I don't think you are intending to
require every build system to do that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open-std.org/pipermail/tooling/attachments/20190208/641a2980/attachment.html
More information about the Tooling
mailing list