Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-15 Thread ben.boeckel via Gcc
On Thu, Dec 15, 2022 at 07:37:35 +, Iain Sandoe wrote: > * I have patches for clang that implements the P1184 interface which > would allow a ‘module mapper’ to be used to discover module name <-> > pathname pairings. > > * The demand for the command line options we are discussing here is

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-14 Thread Iain Sandoe
> On 15 Dec 2022, at 05:58, chuanqi.xcq wrote: > > Hi Nathan, > > > But how do they specify the mapping from module/header-unit name to CMI, so > > that > > imports work? > > > > Is this really a clang-specific mechanism, as it has no module mapper ATM > > (IIUC)? > > Yes, clang doesn't h

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-14 Thread chuanqi.xcq via Gcc
Hi Nathan, > But how do they specify the mapping from module/header-unit name to CMI, so > that > imports work? > > Is this really a clang-specific mechanism, as it has no module mapper ATM > (IIUC)? Yes, clang doesn't have a module mapper. And I remember Iain said he want to introduce these op

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-14 Thread Nathan Sidwell via Gcc
I'm missing something from this discussion. IIUC the claim is that these 2 new options -fmodule-output{,=NAME} are for build systems that want to specify the module output file. But how do they specify the mapping from module/header-unit name to CMI, so that imports work? Is this really a c

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-14 Thread David Blaikie via Gcc
On Wed, Dec 14, 2022 at 1:56 AM chuanqi.xcq wrote: > > Hi David, > > > I think Nathan might've been asking not only about what currently > happens, but what we think should happen? > > Yes. > > > Is that consistent with `-o`? (I assume so, but don't know - I guess > there aren't many cases where `

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-14 Thread chuanqi.xcq via Gcc
Hi David, > I think Nathan might've been asking not only about what currently happens, but what we think should happen? Yes. > Is that consistent with `-o`? (I assume so, but don't know - I guess there aren't many cases where `-o` is unused (maybe `-fsyntax-only`), so that behavior might be a bit l

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-13 Thread David Blaikie via Gcc
I think Nathan might've been asking not only about what currently happens, but what we think should happen? On Mon, Dec 12, 2022 at 7:11 PM chuanqi.xcq wrote: > > Hi Nathan, > > > 1) Are these flags silently ignored, if no module output is to be > > generated? Or is some kind of diagnostic gene

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-12 Thread chuanqi.xcq via Gcc
Hi Nathan, > 1) Are these flags silently ignored, if no module output is to be generated? > Or is some kind of diagnostic generated? Currently, clang will generate the unused-command-line-argument warning for this case: ``` argument unused during compilation: '-fmodule-output' [-Wunused-command-

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-12 Thread Nathan Sidwell via Gcc
On 12/9/22 12:33, Iain Sandoe wrote: Hello all. On 9 Dec 2022, at 01:58, chuanqi.xcq wrote: It looks like `-fmodule-file` is better from the discussion. So let's take it. Thanks for everyone here So FAOD (after this discussion) Chuanqi's current patchset implements the following in clang:

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-09 Thread David Blaikie via Gcc
Thanks Iain for the summary/thanks everyone for the discussion! On Fri, Dec 9, 2022 at 9:33 AM Iain Sandoe wrote: > > Hello all. > > > On 9 Dec 2022, at 01:58, chuanqi.xcq wrote: > > > > It looks like `-fmodule-file` is better from the discussion. So let's take > > it. Thanks for everyone here

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-09 Thread Iain Sandoe
Hello all. > On 9 Dec 2022, at 01:58, chuanqi.xcq wrote: > > It looks like `-fmodule-file` is better from the discussion. So let's take > it. Thanks for everyone here So FAOD (after this discussion) Chuanqi's current patchset implements the following in clang: -fmodule-output - this cause

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-08 Thread chuanqi.xcq via Gcc
It looks like `-fmodule-file` is better from the discussion. So let's take it. Thanks for everyone here~ Thanks, Chuanqi -- From:Nathan Sidwell Send Time:2022年12月8日(星期四) 01:00 To:Iain Sandoe ; GCC Development Cc:Jonathan Wakely ; ch

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-07 Thread Nathan Sidwell via Gcc
On 12/7/22 11:58, Iain Sandoe wrote: On 7 Dec 2022, at 16:52, Nathan Sidwell via Gcc wrote: On 12/7/22 11:18, Iain Sandoe wrote: I think it is reasonable to include c++ in the spelling, since other languages supported by GCC (and clang in due course) have modules. I disagree (about the

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-07 Thread Iain Sandoe
> On 7 Dec 2022, at 16:52, Nathan Sidwell via Gcc wrote: > > On 12/7/22 11:18, Iain Sandoe wrote: > >> I think it is reasonable to include c++ in the spelling, since other >> languages supported by >> GCC (and clang in due course) have modules. > > I disagree (about the reasonableness part)

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-07 Thread Nathan Sidwell via Gcc
On 12/7/22 11:18, Iain Sandoe wrote: I think it is reasonable to include c++ in the spelling, since other languages supported by GCC (and clang in due course) have modules. I disagree (about the reasonableness part). Other languages have modules, true, but if they want to name the output fi

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-07 Thread Nathan Sidwell via Gcc
On 12/7/22 10:23, Jonathan Wakely wrote: On Wed, 7 Dec 2022, 02:30 chuanqi.xcq via Gcc, > wrote: \ (2) If (1) is not acceptable and we love to keep the command line consistency, I think clang can use '-fmodule-output=' as long as we make it clear in the do

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-07 Thread ben.boeckel via Gcc
On Wed, Dec 07, 2022 at 16:18:00 +, Iain Sandoe wrote: > I think it is reasonable to include c++ in the spelling, since other > languages supported by > GCC (and clang in due course) have modules. Especially given that Fortran doesn't necessarily have one module to output; Fortran sources can

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-07 Thread Iain Sandoe
Hi Folks, > On 7 Dec 2022, at 15:45, ben.boeckel via Gcc wrote: > > On Wed, Dec 07, 2022 at 15:23:09 +, Jonathan Wakely wrote: >> I disagree. I can easily remember "module output" but I would have to check >> the manual every time to see if it's "std c++ module save file" or some >> other pe

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-07 Thread ben.boeckel via Gcc
On Wed, Dec 07, 2022 at 15:23:09 +, Jonathan Wakely wrote: > I disagree. I can easily remember "module output" but I would have to check > the manual every time to see if it's "std c++ module save file" or some > other permutation of those words I can say that in developing the CMake side of t

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-07 Thread Jonathan Wakely via Gcc
On Wed, 7 Dec 2022, 02:30 chuanqi.xcq via Gcc, wrote: > Hi Nathan, > > 1) 'save' -- does it *cause* the bmi to be saved, or is that actually > controlled > by other options? (I suspect the latter) > Yes, it causes the bmi to be saved. In fact, when we add `-save-temps` > option in clang and we co

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-06 Thread chuanqi.xcq via Gcc
Hi Nathan, > 1) 'save' -- does it *cause* the bmi to be saved, or is that actually > controlled by other options? (I suspect the latter) Yes, it causes the bmi to be saved. In fact, when we add `-save-temps` option in clang and we compile a module unit, we'll see the preprocessed output, the bm

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-06 Thread Jonathan Wakely via Gcc
On Wed, 7 Dec 2022, 00:36 Nathan Sidwell via Gcc, wrote: > On 12/6/22 16:03, David Blaikie wrote: > > Over in https://reviews.llvm.org/D137059 we're discussing the naming > > of a clang flag - would be good to have it be consistent with GCC. > > > > The functionality is to name the BMI (.pcm in C

Re: Naming flag for specifying the output file name for Binary Module Interface files

2022-12-06 Thread Nathan Sidwell via Gcc
On 12/6/22 16:03, David Blaikie wrote: Over in https://reviews.llvm.org/D137059 we're discussing the naming of a clang flag - would be good to have it be consistent with GCC. The functionality is to name the BMI (.pcm in Clang's parlance) output file when compiling a C++20 module. Current propo