[cfe-dev] [LLVMdev] RFC: Upcoming Build System Changes
Joerg Sonnenberger
joerg at britannica.bec.de
Tue Nov 1 16:15:57 PDT 2011
On Tue, Nov 01, 2011 at 05:23:02PM -0500, David A. Greene wrote:
>
> Here's the dirty little secret. At Cray we incorporated LLVM into our
> build system. We don't use the autoconf+make stuff at all for our
> compiler build. We do use the "official" LLVM way to build the LLVM
> tree so we can use the tools (opt, llc, etc.).
So I am maintaing Makefiles for NetBSD for LLVM as well. I know the
FreeBSD guys do the same for them. I use recursive Makefiles. I don't
use shared libraries. Guess what, the only special handling is for the
tblgen build and in total, there are six serialisation points. It's
quite hard to improve on that even with perfect fine grained
dependencies.
> And guess what? A non-recursive build of all the Cray components (and
> it's a huge source base, at least as large as LLVM and probably larger)
> + most of LLVM (we don't build all targets) is much faster than a build
> of just the LLVM tree using the "official" recursive make way. I
> believe that to be true both for an empty build AND a full rebuild,
> though I would have to gather hard data to be sure about the latter.
It still doesn't say much. In many ways, GNU make is horrible. It is
quite hard to write a good build system for it where the individual
Makefiles are anywhere near the compactness of the CMakeLists.txt files.
It's hard to control concurrency and still retain the compact
Makefiles. It doesn't invalidate the approach as long as the number of
targets per Makefile and the number of directories is reasonable small.
Both is true for LLVM.
Joerg
More information about the cfe-dev
mailing list