From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id 96177384D3D5 for ; Fri, 9 Dec 2022 17:33:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 96177384D3D5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 11123 invoked from network); 9 Dec 2022 17:33:07 -0000 X-APM-Out-ID: 16706071871112 X-APM-Authkey: 257869/1(257869/1) 6 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 9 Dec 2022 17:33:07 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Naming flag for specifying the output file name for Binary Module Interface files From: Iain Sandoe In-Reply-To: <29c9ff1a-2c88-4e02-81e0-9780020b8e77.yedeng.yd@linux.alibaba.com> Date: Fri, 9 Dec 2022 17:33:06 +0000 Cc: Nathan Sidwell , Jonathan Wakely , David Blaikie , "ben.boeckel" , "chuanqi.xcq" Content-Transfer-Encoding: quoted-printable Message-Id: References: <96699ff0-f4d7-4276-8af7-5a4ce9735174@acm.org> <6CFAC937-F5FD-49B3-A5E3-4ED83B270DCC@sandoe.co.uk> <2f005f8a-5e96-aece-c654-ab4b090da409@acm.org> <29c9ff1a-2c88-4e02-81e0-9780020b8e77.yedeng.yd@linux.alibaba.com> To: GCC Development X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_COUK,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello all. > On 9 Dec 2022, at 01:58, chuanqi.xcq = wrote: >=20 > 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 causes the BMI to be saved in the CWG with the basename of the = source file and a suffix of .pcm. -fmodule-output=3D - this causes the BMI to be saved at the path specified. =3D=3D=3D These facilities support build systems that do not use the P1184 = interface to map between module names and paths. cheers Iain >=20 > Thanks, > Chuanqi > ------------------------------------------------------------------ > From:Nathan Sidwell > Send Time:2022=E5=B9=B412=E6=9C=888=E6=97=A5(=E6=98=9F=E6=9C=9F=E5=9B=9B= ) 01:00 > To:Iain Sandoe ; GCC Development > Cc:Jonathan Wakely ; chuanqi.xcq = ; David Blaikie ; = ben.boeckel > Subject:Re: Naming flag for specifying the output file name for Binary = Module Interface files >=20 > On 12/7/22 11:58, Iain Sandoe wrote: > >=20 > >=20 > >> 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). Other languages have = modules, true, but if they want to name the output file, why not have = the same option spelling? > >> > >> I.e. why are we considering: > >> > >> $compiler -fc++-module-file=3Dbob foo.cc > >> $compiler -ffortran-module-file=3Dbob foo.f77 > >> > >> The language is being selected implicitly by the file suffix (or = explictly via -X$lang). There's no reason for some other option = controlling an aspect of the compilation to rename the language. We = don't do it for language-specific warning options, and similar. (i.e. = no -f[no-]c++-type-aliasing vs -fc-type-aliasing, nor -Wc++-extra vs = -Wc-extra[*] > >=20 > > Fair points. > >=20 > > Unfortunately (in case it has not already been mentioned in this = thread) =E2=80=98-fmodule-file=3D=E2=80=98 is already taken and it means = an input, not an output. So, whatever we choose it needs to be distinct = from that. >=20 > Yes, that's why I suggested -fmodule-output=3D >=20 > nathan >=20 > --=20 > Nathan Sidwell