[LLVMdev] Ninja (make replacement)

Mikael Lyngvig mikael at lyngvig.org
Sun Jun 17 16:30:18 PDT 2012


Hi Christoph,

It is a good question even though it is obvious :-)  No, for the last few
days, I have not been able to build Clang with make -j2 or -j4 - the build
always fails on a ranlib operation.

Also, on Windows, GNU Make seems to be somewhat broken with respect to
parallel builds: It doesn't change a thing whether you specify -j2 or -j4
on a quad-core machine (with hyper-threading disabled in BIOS): The load
never passes 50 percent.  I have searched the net and found various magic
recipes for how to fix the problem, but none of them worked.

Perhaps somebody with a make-friendly platform (Linux, Solaris, etc.) will
post their numbers with "make -j6" versus "ninja" (Ninja defaults to six
threads).

All I can say is that for Windows users, Ninja is the best news in years.
 And I have seen Mac owners report a speed-up of 2.5 times.  So I don't
think it is only on Windows it is a win-win situation.

Supposedly, Ninja is built for speed.  I am myself VERY surprised that
there were so large gains to be had just from switching out your make tool
with ninja.  And by the way, you invoke ninja just like make: "ninja",
"ninja check", "ninja install", and so on.


Best regards,
Mikael


2012/6/18 Christoph Erhardt <christoph at sicherha.de>

> Hi Mikael,
>
> > My Clang build used to take 59:29 minutes using MinGW Makefiles.  With
> > Ninja, it takes 18:43 minutes!  That's a speed up of factor three.
> sorry for asking the obvious question: Are you comparing against a
> parallel "make -j<n>"? :-)
>
> Best regards,
> Christoph
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120618/d0ff91c1/attachment.html>


More information about the llvm-dev mailing list