Thanks Iain for the summary/thanks everyone for the discussion!
On Fri, Dec 9, 2022 at 9:33 AM Iain Sandoe <i...@sandoe.co.uk> wrote: > > Hello all. > > > On 9 Dec 2022, at 01:58, chuanqi.xcq <yedeng...@linux.alibaba.com> 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 causes the BMI to be saved in the CWG with the basename of the > source file and a suffix of .pcm. > > -fmodule-output=<path> > > - this causes the BMI to be saved at the path specified. > > === > > These facilities support build systems that do not use the P1184 interface to > map between module names and paths. > > cheers > Iain > > > > > Thanks, > > Chuanqi > > ------------------------------------------------------------------ > > From:Nathan Sidwell <nat...@acm.org> > > Send Time:2022年12月8日(星期四) 01:00 > > To:Iain Sandoe <i...@sandoe.co.uk>; GCC Development <gcc@gcc.gnu.org> > > Cc:Jonathan Wakely <jwakely....@gmail.com>; chuanqi.xcq > > <yedeng...@linux.alibaba.com>; David Blaikie <dblai...@gmail.com>; > > ben.boeckel <ben.boec...@kitware.com> > > Subject:Re: Naming flag for specifying the output file name for Binary > > Module Interface files > > > > On 12/7/22 11:58, Iain Sandoe wrote: > > > > > > > > >> On 7 Dec 2022, at 16:52, Nathan Sidwell via Gcc <gcc@gcc.gnu.org> 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=bob foo.cc > > >> $compiler -ffortran-module-file=bob 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[*] > > > > > > Fair points. > > > > > > Unfortunately (in case it has not already been mentioned in this thread) > > > ‘-fmodule-file=‘ is already taken and it means an input, not an output. > > > So, whatever we choose it needs to be distinct from that. > > > > Yes, that's why I suggested -fmodule-output= > > > > nathan > > > > -- > > Nathan Sidwell >