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

Iain Sandoe iain@sandoe.co.uk
Thu Dec 15 07:37:35 GMT 2022



> On 15 Dec 2022, at 05:58, chuanqi.xcq <yedeng.yd@linux.alibaba.com> 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 have a module mapper. And I remember Iain said he want to introduce these options in GCC.

To clarify:

 * 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 coming from build systems folks who want to be able to specify everything on the command line (i.e. from my understanding they do not want to use a module mapper, but prefer dependency scanning).

So I think the two aspects are somewhat independent, I would expect the same build systems folks to want to be able to specify everything on the GCC command line too.

thanks,
Iain


> 
> Thanks,
> 
> Chuanqi
> 
> ------------------------------------------------------------------
> From:Nathan Sidwell <nathan@acm.org>
> Send Time:2022年12月15日(星期四) 06:29
> To:David Blaikie <dblaikie@gmail.com>; chuanqi.xcq <yedeng.yd@linux.alibaba.com>
> Cc:Iain Sandoe <iain@sandoe.co.uk>; GCC Development <gcc@gcc.gnu.org>; Nathan Sidwell <nathanmsidwell@gmail.com>; Jonathan Wakely <jwakely.gcc@gmail.com>; ben.boeckel <ben.boeckel@kitware.com>
> Subject:Re: Naming flag for specifying the output file name for Binary Module Interface files
> 
> 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 clang-specific mechanism, as it has no module mapper ATM (IIUC)?
> 
> nathan
> -- 
> Nathan Sidwell
> 



More information about the Gcc mailing list