[PATCH] D137058: [Driver] [Modules] Support -fsave-std-c++-module-file (1/2)
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 3 15:29:35 PDT 2022
dblaikie added a subscriber: rsmith.
dblaikie added a comment.
I realize I got this jumbled up and the thread about "why do we need to name things" is meant to be over in D137059 <https://reviews.llvm.org/D137059> (sorry @ben.boeckel :/ I know this is all confusing to follow at the best of times) so I'll pick that up there.
But maybe a relevant question /here/ (maybe @iains has some context here, and @ben.boeckel ): What are GCC's (& any other implementations) command line interfaces for things like this? How're the command line flags spelled? To see about inspiration for this.
(judging from the discourse thread with @rsmith it seems like "the ability to generate a .o from a .pcm" is disfavored, he didn't outright say "we should remove that functionality" but pretty close to it - in favor of ".cppm -> {.o, .pcm}" and ".ccpm -> .o" + ".cppm -> .pcm" (without the ability to generate the .o from the .pcm) - in which case we could change the existing driver behavior sooner or later to address that third action (.cppm -> .pcm but it's only a minimal pcm). Maybe we should have two flags one that says "produce a .pcm" (which we already have `--precompile` for that) and another that says "produce a .o" (I guess that's the default, so maybe we want a way to opt /out/ of that behavior?))
Eh, sorry, just talking myself around in circles.
Currently we have:
`.cppm` -> `.o` (no extra flags)
`.cppm` -> `.pcm` (`--precompile`)
`.cppm` -> `.pcm` + `.o` (unsupported)
I'm not sure that `--precompile` is the best flag name to be inspired by (it's unqualified by any `-f` or other prefix, which usually feels a bit weird, and it's a very generic term, doesn't mention modules, etc) - so I can appreciate the `-fsave-std-c++-module-file` name here, but it does sound a bit verbose? Wouldn't mind hearing other people's thoughts on flag names, especially any prior art/other implementation choices we could look for for inspiration.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137058/new/
https://reviews.llvm.org/D137058
More information about the cfe-commits
mailing list