C++ Logo


Advanced search

Re: Modules Build System Scenarios

From: Ruki Wang <waruqi_at_[hidden]>
Date: Mon, 07 Mar 2022 11:23:56 -0000
> Scan all source files within the project to 1) identify defined modules,
2) identify which modules each source file imports, and 3) construct a DAG
of module dependencies to be used to execute a build plan that ensures
that, for each module M, a BMI is built for the module interface unit
source file(s) that define M before any source file that imports M is
compiled. See clang-scan-deps.

Hi all, I'm the author of the xmake build tool, I have verified this
solution in xmake. It usually works fine.

But if there are a lot of module definition files in the project, this will
affect the time of first compilation, because additional dependency
analysis time is required.

In addition, if the DAG of module dependencies is complex, it will also
affect the parallel compilation of module files. I'm not sure if there is a
solution to both problems.

Peter Brett via SG15 <sg15_at_[hidden]> 于2022年3月7日周一 17:46写道:

> Hi Tom,
> This is a really helpful document – thank you.
> I hope it will eventually become a paper!
> Peter
> *From:* SG15 <sg15-bounces_at_[hidden]> *On Behalf Of *Tom Honermann
> via SG15
> *Sent:* 05 March 2022 07:10
> *To:* sg15_at_[hidden]
> *Cc:* Tom Honermann <tom_at_[hidden]>
> *Subject:* [SG15] Modules Build System Scenarios
> Following the 2022-03-05 SG15 telecon, I decided to make an attempt at
> describing the various build system scenarios we've been discussing. Please
> see the following Google doc.
> -
> https://docs.google.com/document/d/1JWW7Q-94nx6ObpupePkA2NAER7rylJQZpw4t755aeZQ/edit?usp=sharing
> <https://urldefense.com/v3/__https:/docs.google.com/document/d/1JWW7Q-94nx6ObpupePkA2NAER7rylJQZpw4t755aeZQ/edit?usp=sharing__;!!EHscmS1ygiU1lA!T1BZbJU6vg_Hgs1GtJ0QI56F9Fve5gJaJxC6_G6EnDN-KVn1vWy4h7V3PgZNJw$>
> Please feel free to edit the doc or add comments to it; the doc is
> publicly shared.
> I know Google Docs is not convenient or even accessible to everyone. If
> you are not able to view the doc, let me know and I'll send a copy as an
> attachment. For now, I'm hoping that collaborative editing will help fill
> in gaps and correct mistakes and misunderstandings.
> The solution sections are vague and, for the last scenario, probably
> unrealistic. I just wanted to include something as a starting point.
> Tom.
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg15

Ruki Wang

Received on 2022-03-07 11:23:56