[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 15:24:21 PDT 2022
dblaikie added a comment.
In D134267#3869162 <https://reviews.llvm.org/D134267#3869162>, @iains wrote:
> In D134267#3868830 <https://reviews.llvm.org/D134267#3868830>, @dblaikie wrote:
>
>> I'm OK with sticking with the existing `-fmodule-file` if that works for everyone. Yeah, it's short and ambiguous in a space with many concepts of what a "module file" is, but also the fact that it's a `-f` flag might help disambiguate it a bit - it's probably not the way anyone would think/expect to be passing source files, those just get passed without flags on the command line. And any use of it will show the .pcm extension or whatever that should make it clear enough what's going on.
>
> hmm (I realise I mentioned this, and hope it has not complicated things) ..
>
> .. I was thinking of the `-fmodule-file=<name>=filename` variant. The problem with using it without (the <name>) is that -fmodule-file= can (and does) appear multiple times on the command line to specify dependent modules - so that one would have to specify which (named) module was related to the filename.
I'm really not following, sorry (which is a statement I could put on almost every discussion about modules build implications, to be honest - as much as it's something I've been involved with for years - so it's not your fault, as such, just that this stuff is hard, I think)
I /think/ currently `-fmodule-file` works with Clang header modules presumably because the module files contain within them enough information to enable the compiler to substitute the module for an include where necessary? I'm not sure the `<name>=` part is necessary, as such, if the BMIs can reasonably contain enough identifying info to make their use clear to the consumer.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134267/new/
https://reviews.llvm.org/D134267
More information about the cfe-commits
mailing list