![]() ![]() In the first phase, the graph is walked up from the final output to the input files to see if there are any modifications and creates a plan for the build.In the case of Ninja, this is a two-phase traversal where: The build process traverses this graph to get the final output. (In the next section, I have an image of this graph for Ninja itself). Builds are always being run in parallel, based by default on the number of CPUs your system hasĮvery build system eventually creates a graph of dependencies by parsing the build file.Having a minimal set of policies or built-in rules (to be taken care of by ninja input files).Choosing speed over convenience as a design principle.It reduced the build start-up time of Chrome to under one second and was open-sourced soon after. Using Makefiles was found to be suboptimal and a new build system conceptually very similar to Make but with a focus on speed was conceived. ![]() During the porting of Chromium from Windows to other operating systems, build performance was becoming a bottleneck. Let us begin with why Ninja was invented. What is Ninja and why another build system? Naming the build system Ninja is apt as I will show you its capabilities in this blog post and highlight this USP. When developing a “yet another build system” – as the creator of Ninja, Evan Martin, referred to Ninja in its manual – speed was of paramount importance. The word Ninja invokes the imagery of stealth and speed in my mind.
0 Comments
Leave a Reply. |