rsmith added a comment.
I really don't like the command-line interface you're proposing here. It seems
like it will be extremely confusing what something like `-fmodules
-fexclusive-builtin-modules` means, for instance (usually, later `-f` flags
override earlier ones, so does this *turn off* modules for everything other
than builtin headers?). Instead, we should use a command-line interface that
more naturally / obviously composes with other flags.
It seems like the behavior you want here is precisely:
`-fmodules -fno-implicit-module-maps -fmodule-map-file=<resource
(The `-fmodules-validate-system-headers` part would only make sense for people
using clang directly from their build area; installed / released versions of
clang should not need this. Adding it makes your flag compose poorly with other
uses of modules.)
I'd be happy with you adding a flag that is equivalent to
Also, it seems unlikely to me that we would ever turn this on by default. It
will cause havoc for distributed builds, especially ones that run compilation
actions in 'clean' environments, as (for instance) it will cause the complete
set of intrinsics headers to be compiled into a module on every compile. So if
this is your proposed solution for slow compiles using intrinsics headers, you
should be aware that this is not a complete solution to that problem.
cfe-commits mailing list