C++ Logo

sg15

Advanced search

Re: [Tooling] Modules feedback

From: Matthew Woehlke <mwoehlke.floss_at_[hidden]>
Date: Tue, 12 Feb 2019 15:49:22 -0500
On 12/02/2019 15.28, Corentin wrote:
> Shipping BMI would be counterproductive on Linux. Instead, you would
> ship the headers and the Module Interface Units source files*, And
> you would consume them by generating a BMI then go on with your
> build and get some compile-time benefits if the BMI is used in
> multiple TU.

I really, really hope we can get some kind of caching for this...
because while it's true that we can't *rely* on everyone using the same
compiler, *in practice* I will almost certainly have multiple projects
that all consume some set of libraries with the same compiler, which
means they could share BMI's. There's a fair chance even (depending on
the extent to which e.g. optimization levels affect BMI's) that I'm
building my own stuff with the same compiler that was used to build the
library originally, and that I *could* use BMI's generated by the
library build.

IOW, while we can't *rely* on shipping BMI's, it may still be *useful*
to do so.

> * Reason 47 to have a deterministic mapping from module name to Module
> Interface Units identifier.

I'm not entirely convinced we need that. Libraries could also ship a
(build-generated) mapping file that tells consumers how to find the
appropriate files for a given module name.

-- 
Matthew

Received on 2019-02-12 21:49:25