[llvm-dev] [cfe-dev] FYI: ENABLE_MODULES would make building faster
Boris Kolpackov via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 12 00:18:01 PDT 2017
David Blaikie via cfe-dev <cfe-dev at lists.llvm.org> writes:
> I have some hope/aspirations of implementing explicit modules* support in
> cmake & so it'll be interesting to compare how much more parallelism can be
> achieved by that.
I think it will be hard to implement this "properly" in CMake until the
underlying build systems are module-aware, similar to how (most) of them
being header-aware. Specifically, generating all the .pcm's during some
sort of a pre-build step will hinder parallelism since in a sense you will
have a "barrier" between compiling module interfaces and other sources.
Ideally, you would want to start compiling sources as soon as all the
module interfaces that they actually use are ready. Especially so if
you have a -j72 kind of machine ;-).
Then there is the issue of change detection: you probably don't want to
make all your sources depend on all your module interfaces.
FWIW, we have implemented this "proper" module support (though for
-fmodule-ts only) in build2[1], if you (or anyone else) would like
to try it.
[1] https://build2.org/
Boris
More information about the llvm-dev
mailing list