[PATCH] D137059: [Driver] [Modules] Introduce -fsave-std-c++-module-file= to specify the path of the module file (2/2)

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 5 20:55:43 PST 2022


iains added a comment.

In D137059#3973016 <https://reviews.llvm.org/D137059#3973016>, @ben.boeckel wrote:

> In D137059#3934448 <https://reviews.llvm.org/D137059#3934448>, @dblaikie wrote:
>
>> I'm still curious what about the details of other compilers - I think from the sounds of it, @iains suggested GCC doesn't support this yet so we'll need to pick/name the flag ourselves & he's happy to implement whatever we pick? I guess Microsoft's flag naming is sufficiently differently styled as to offer no useful inspiration? Though wouldn't hurt to know what they name it.
>>
>> Any other examples you had in mind, Ben?
>
> GCC supports naming the output file by asking the "module mapper" where a module with a given name lives (also used for finding imported modules).

This is using the "P1184 <https://reviews.llvm.org/P1184>" interface for both tasks - which I think we should keep as a separate mechanism (at least mentally) since we can also use that with clang when we implement it.  What the interface returns for the name (via P1184 <https://reviews.llvm.org/P1184>) is decoupled from how the name is determined (potentially by a command line argument or from some other build system component).

Currently, GCC does not have a command line spelling for specifying the output module name, which is why I say it's still "up for grabs" (actually it would be polite to ask on gcc at gcc.gnu.org for opinions on the spelling, since it would be crazy to have different on at least these two platforms).  The spelling of command line options is not IMO bike shedding, it affects day-to-day use of the tools.


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

https://reviews.llvm.org/D137059



More information about the cfe-commits mailing list