Date: Sat, 2 Apr 2022 10:05:57 -0500
On Fri, Apr 1, 2022 at 3:37 PM Ruki Wang via SG15 <sg15_at_[hidden]>
wrote:
>
> > 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.
>
As expected and predicted.
>
> 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.
>
I wrote a paper long ago pointing out that tradeoff <
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1441r1.pdf>. It
was simulated at the time as module implementations were minimal and build
system support was non-existent. Do you know of a project that has hit the
DAG depth vs parallel compilation inflection point? An, AFAIK there is no
solution to the problem. But I would be really happy to be proven wrong :-)
wrote:
>
> > 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.
>
As expected and predicted.
>
> 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.
>
I wrote a paper long ago pointing out that tradeoff <
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1441r1.pdf>. It
was simulated at the time as module implementations were minimal and build
system support was non-existent. Do you know of a project that has hit the
DAG depth vs parallel compilation inflection point? An, AFAIK there is no
solution to the problem. But I would be really happy to be proven wrong :-)
-- -- René Ferdinand Rivera Morell -- Don't Assume Anything -- No Supone Nada -- Robot Dreams - http://robot-dreams.net
Received on 2022-04-02 15:06:10