C++ Logo

sg15

Advanced search

Re: [Tooling] [isocpp-modules] Dependency format with module details implementation

From: Ben Boeckel <ben.boeckel_at_[hidden]>
Date: Thu, 11 Apr 2019 08:29:41 -0400
On Wed, Apr 10, 2019 at 21:36:25 +0000, Gabriel Dos Reis wrote:
> Right, but wouldn't the build system would have set up a step to build
> the BMI for '<foo.h>' because foo.cpp has a dependency on the BMI of
> <foo.h>? Why is the information required for this to work any
> different from if you had used #include of a header that contained an
> import-declaration?

Yes, I have to set up the rule to build the BMI, but if nothing imports
the header, I don't want to build the BMI. Imagine that I import one
single Boost header. Should I have to wait for the build system to build
a BMI for every single (public) Boost header? I hope not.

> I guess I am trying to understand why we need to generalize this to
> header units...

It's required for creating an efficient build (one where only what needs
built is built).

--Ben

Received on 2019-04-11 14:29:44