[LLVMdev] RFC: Upcoming Build System Changes

Óscar Fuentes ofv at wanadoo.es
Tue Nov 1 18:41:33 PDT 2011


Chris Lattner <clattner at apple.com> writes:

>> You keep repeating that and I say that it is wrong. Can you mention a
>> serialization point on the LLVM build caused by recursive make?
>> (GenLibDeps is not such example, as described on a previous message.)
>
> Any use of DIRS is a serialization point.  For example, lib/Support ->
> lib/TableGen -> utils are all built in serial before anything else is.

AFAIU DIRS is used for lib/Support an lib/TableGen because the latter
depends on the first. This is not relevant on static builds (or shared
builds on Linux, IIRC) so, if the `make' scripts were smart enough, that
case of DIRS could become something like PARALLEL_DIRS_IF_STATIC. That
would make possible to compile the source files of both libraries at the
same time. BTW, the cmake build did that (don't know if keeps doing it
after the switch to explicit dependencies.)

But you and Dave are right wrt recursive make hiding details of the
build. A non-recursive make could compile the files on both libraries
without introducing any hacks.

My insistence on Dave being wrong comes from my experience with the
cmake build. There, we turn DIRS on PARALLEL_DIRS (except when building
shared libraries on OS/X) and the amount of parallelism is huge.
Essentially, there are three phases: building Support&utils, building
the rest of the libraries, and building the tools (the final two phases
are intermingled to some extent.) I expect that even a 64core machine
will be quite busy almost all the time.



More information about the llvm-dev mailing list