[rust-dev] RFC: Future of the Build System

Gaetan gaetan at xeberon.net
Wed Jan 15 07:34:29 PST 2014

I just hate the "if/elseif/else" block in CMake list, that's all :)

One of the major advantage of cmake is the huge list of supported
dependency scripts that is provided out of the box. You want to use QT4 in
your software, just write 'FindPackage(QT4)'. That is a good inspiration.


2014/1/15 Jack Moffitt <jack at metajack.im>

> > used. The makefile macro may be rewritten in CMakeList.txt stuff, but
> this
> > will still generate makefiles and thus don't solve the compilation time.
> Our Makefiles are quite inferior to the ones that CMake generates. For
> example, if you run `make` on an up to date servo tree, it takes
> several seconds. If you run `make` on an up to date Servo tree where
> the makefiles are generated by CMake, it is substantially faster. Like
> 0.3s or so. I didn't do a full port to CMake but I was surprised at
> how bad our build currently was.
> Not only that but our hand written Makefiles are pretty loose about
> dependency calculation and tracking, especially across submodule
> boundaries. There's lots of file globs and very little attention paid
> to C headers. Both of these CMake solves.
> The fact that we often see people getting decoder ICEs in rustc is a
> testament to just how unreliable the current system is. Every new
> submodule we add and every new flag just increases this problem.
> Writing make abstractions is tedious an difficult. Writing them in
> nearly anything else would be easier.
> I mean, you are right that it won't fix LLVM optimization passes, so
> the Rust compiler's build time won't change much, but the output
> should be substantially more reliable. It might make a noticeable
> difference to those doing a lot of compiler dev work due to the
> quicker invocations of the tool.
> > I'm curious about ninja, it is its promise to provide a simple, clean,
> > super-fast Make. It has been made to replace the old Makefiles and even
> > scons files to build google chrome.
> Ninja is pretty fast, but CMake's generated Makefiles are probably not
> far off on a project of our size. The place where this difference is
> most noticeable is on builds of an up to date tree. One reason it is
> fast, and also the reason it needs a generator, is that it makes no
> decisions at runtime. There is no branching, etc, just the dependency
> info and the commandlines to generate the build products.
> Note that CMake also removes the need for autotools, which is a
> blessing in itself. You may not like CMake's language, but I'll take
> it over m4 any day.
> jack.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140115/ebaef846/attachment.html>

More information about the Rust-dev mailing list