[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 12:18:31 PDT 2022


iains added a comment.

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.

In a pre-scanned world, the build system does know the info for each source file (published and dependent modules) [which ought to dispel some of the concerns raised about not knowing about possible outputs for implementation/interface cases].

In a discovery world, the interface to the build system carries all of this traffic anyway so that the command line would only be providing pre-set data for that.

.. and we do not care about header units in this discussion since they have to be handled specially anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134267/new/

https://reviews.llvm.org/D134267



More information about the cfe-commits mailing list