This is a mirror of official site: http://jasper-net.blogspot.com/

Google man open sources Chrome build system

| Monday, February 14, 2011
Google Chrome developer Evan Martin has open sourced the custom-designed build system he uses to build the browser's Linux port.

Martin calls the system Ninja because it "strikes quickly." According to Martin's Ninja manual, he previously used a customized system based on the old GNU Make build-automation system, and while this needed 10 seconds to start building the open source Chromium browser after a file change was made, Ninja takes under a second.

When Google first decided to port Chrome beyond Windows, Martin says on his blog, the company considered using the Scons software-construction tool, but it was soon deemed to be too slow. According to Martin, Scons needed about 40 seconds before it started building.

Chrome is a single executable with about 30,000 source files.

Dropping Scons, Google began using plain old Makefiles to port the browser. And Martin was soon haunted by build times. "I [became] more and more obsessed with build performance," he says. "I once clocked our Windows build taking eight minutes to finish linking after a one-file change and I found it devastating for both my productivity and my morale."

Martin tweaked the system until he had worked incremental builds down to between 10 and 20 seconds. But this wasn't enough. "I still wasn't happy about the ten seconds of waiting between running 'make' and the first compilation step starting. It seemed to me that with a warm disk cache, it shouldn't need to think that hard," Martin says.

Read more: The Register

Read more: Google Ninja

Posted via email from Jasper-net

0 comments: