[cfe-dev] RFC: Upcoming Build System Changes

Óscar Fuentes ofv at wanadoo.es
Thu Oct 27 23:28:04 PDT 2011


Chris Lattner <clattner at apple.com> writes:

> There are several major problems with CMake IMO:
>
> 1. It generates really slow build systems.

In my Linux box, last time I checked (long time ago) the cmake build was
a bit faster than the Makefiles. But this is a tricky terrain, because
they are not identical, not on the features supported (and some have an
impact on build-time) nor even on the options passed to the compiler.

> 2. The build system generated by cmake is absolute garbage, at least
> for Xcode.  The build times of it are really bad, and having to work
> with it in the IDE is even more terrible.

AFAIK there is a Xcode project file on the LLVM source tree. Are the
LLVM makefiles used by the Xcode project? If the Xcode project files
generated by cmake is not satisfactory, can't they use the Makefiles
generated by cmake instead?

Months ago an Apple developer contacted the cmake team for exposing
those problems. I don't know if the effort had some positive result.

> 3. I'd really like us to get to explicit and principled library
> dependencies, where the build horks if you accidentally add a library
> dependency.  Without this, I don't see how LLVM will ever scale up.

Explicit library dependencies are not a requirement if you want to
inform the developer(s) about a change on the dependency graph. Figuring
out the change is a boring task that can be automated. Approving the
change is the part where a human brain is required. The proponents of
explicit dependencies seem to mix those two things.

Anyways, that's not a problem with cmake. Actually, as it actually
switched to explicit dependencies, it holds and "advantage" there.

> 4. I'd really like us to move in a direction where LLVM is less
> monolithic.  Right now "llvm" contains all the MC stuff, all the
> targets, all the mid-level optimizer, etc.  Adding a new LLVM MC-based
> linker will cause it to naturally get dropped into the llvm project,
> which is great but not helping the monolithicness. :)

Cmake is far more flexible here. Just consider the changes required for
building clang outside the LLVM source tree, a feature that was added
long time after the cmake build was stable. Implementing that took less
than an hour.

[snip]




More information about the cfe-dev mailing list