public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: David Blaikie <dblaikie@gmail.com>,
	gcc Mailing List <gcc@gcc.gnu.org>,
	Iain Sandoe <iain@sandoe.co.uk>,
	"chuanqi.xcq" <yedeng.yd@linux.alibaba.com>
Subject: Re: Naming flag for specifying the output file name for Binary Module Interface files
Date: Tue, 6 Dec 2022 19:35:35 -0500	[thread overview]
Message-ID: <96699ff0-f4d7-4276-8af7-5a4ce9735174@acm.org> (raw)
In-Reply-To: <CAENS6EvnS56-TgGJC5MeYs+bmYnyVKorB5S4kyEq8m0zpKjYOg@mail.gmail.com>

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 proposal is to use `-fsave-std-cxx-module-file=` which is
> certainly precise, but maybe a bit verbose. Clang has some other flags
> related to modules that skip the std/cxx parts, and are just
> `-fmodule-*` or `-fmodules-*`, so there's some precedent for that too.
> 
> Do GCC folks have any veto votes (is the currently proposed name
> especially objectionable/wouldn't be acceptable in GCC) or preferences
> (suggestions to add to the pool)?

I think the suggested option name is problematic for a number of additional reasons:

1) 'save' -- does it *cause* the bmi to be saved, or is that actually controlled 
by other options?  (I suspect the latter)

2) 'std' -- why is this there.  There's only one C++ std, with different 
variants thereof being temporally selectable.

3) 'cxx' -- why not 'c++'?  Let's not let this transliteration of + to x get 
into the options -- it hasn't in '-std=c++20' for example.

Might I suggest something more like '-fmodule-output='?  That collates nicely 
with other -fmodule-$FOO options, and the 'output' part is similar to the 
mnemonic '-o' for the regular output file naming.  (Incidentally, as clang 
treats the BMI as a step in the compilation pipeline, what do you do if you just 
want compilation to produce the BMI and no assembly artifact?  Does '-o' name 
the BMI in that case?)

nathan

-- 
Nathan Sidwell


  reply	other threads:[~2022-12-07  0:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 21:03 David Blaikie
2022-12-07  0:35 ` Nathan Sidwell [this message]
2022-12-07  1:45   ` Jonathan Wakely
2022-12-07  2:30   ` chuanqi.xcq
2022-12-07 15:23     ` Jonathan Wakely
2022-12-07 15:45       ` ben.boeckel
2022-12-07 16:18         ` Iain Sandoe
2022-12-07 16:29           ` ben.boeckel
2022-12-07 16:52           ` Nathan Sidwell
2022-12-07 16:58             ` Iain Sandoe
2022-12-07 17:00               ` Nathan Sidwell
2022-12-09  1:58                 ` chuanqi.xcq
2022-12-09 17:33                   ` Iain Sandoe
2022-12-09 17:43                     ` David Blaikie
2022-12-12 14:30                     ` Nathan Sidwell
2022-12-13  3:10                       ` chuanqi.xcq
2022-12-13 15:56                         ` David Blaikie
2022-12-14  9:56                           ` chuanqi.xcq
2022-12-14 18:39                             ` David Blaikie
2022-12-14 22:29                               ` Nathan Sidwell
2022-12-15  5:58                                 ` chuanqi.xcq
2022-12-15  7:37                                   ` Iain Sandoe
2022-12-15 13:21                                     ` ben.boeckel
2022-12-07 16:43       ` Nathan Sidwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96699ff0-f4d7-4276-8af7-5a4ce9735174@acm.org \
    --to=nathan@acm.org \
    --cc=dblaikie@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=yedeng.yd@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).