Re:Ninja – A small build system with a focus on speed
by wonsler on Saturday March 28, 2015 @05:19PM
(#9282796)
A Ninja file is probably no easier to write than a Makefile. But Ninja is a lot faster than make, which is the reason for using it. To see this, configure Chromium to build with Xcode, make, and ninja, and compare the build times.
[ Parent
| on HN ]
Re:Ninja – A small build system with a focus on speed
by arunaugustine on Sunday March 29, 2015 @06:12PM
(#9286671)
Adding to this, from what I understand, ninja was designed to be generated by another more feature-full build tools. For example in chromium, its generated from gyp (generate your projects) files. The fact that its human readable is just a plus.
Makefiles I presume, will be hard to write by hand when:
1. Your project code base is large 2. It take large amount of time or very powerful machines to build sub-modules (V8 for e.g in chromium) so, you don't want to do it all the time 3. Conditional inclusion of sub-modules (for iOS vs Android if you have two separate set of files etc) 4. Sub-modules are pulled in from 3rd parties into your code base
Re:Ninja – A small build system with a focus on speed
by bicubicmess on Sunday March 29, 2015 @02:04AM
(#9284060)
I once wrote a custom build systems in python to generate Make files. I did this because I wanted to use convention instead of configuration and achieve fast builds on multicore machines. Later, after leaving that company, I wanted to recreate a similar build system. I wrote it in python to generate Ninja build files.
I found it easier and cleaner to write Ninja build files.
I wasn't able to do a direct comparison of the build speeds of the two systems, but I bet the Ninja builds were significantly faster.