[webkit-dev] [chromium] make build for chromium/mac (build twice as fast!) & clang for chromium/linux

Nico Weber thakis at chromium.org
Fri Oct 21 13:37:05 PDT 2011


if you don't work on the chromium webkit port for mac or linux, you
can stop reading now.

Three announcements about stand-alone webkit/chromium checkouts:

1.) Chromium/mac is now compiled with clang instead of gcc by default.
This happens automatically, you don't need to do anything (on your
local dev box, too). If you were wondering why compiler diagnostics
are so much better all of a sudden, this is why. On my machine, this
also brought the time for a full build from 23 minutes to 17 minutes.

2.) Chromium/mac can now optionally be built with make instead of
xcodebuild. To do this, run update-webkit with GYP_GENERATORS set to
make like this:

    GYP_GENERATORS=make Tools/Scripts/update-webkit --chromium

build-webkit will then use make instead of xcodebuild, and
new-run-webkit-tests will use the make-produced binary. On my machine,
this reduced full build times from 17 minutes to 12 minutes (50% of
the original gcc & xcodebuild build time). If you build from within
the Xcode IDE as opposed to on the command line, the speed-up might be
a bit smaller. (To switch back to xcodebuild, run the command again
without GYP_GENERATORS set, and delete the out/ folder.)

(Note that this uses mac xcode_settings in the gyp files, not the
linux-specific variables like cflags. This should hopefully make it
fairly unlikely that the behavior of the make build and the xcode
build diverge much.)

3.) As a side effect, the linux make build now supports clang as well.
To use clang on linux, run

    Source/WebKit/chromium/tools/clang/scripts/update.sh  # get clang,
happens automatically on mac
    GYP_DEFINES=clang=1 Tools/Scripts/update-webkit --chromium

and then build like you normally would (`build-webkit --chromium`). On
linux, this mostly gets you better diagnostics, the build doesn't get
all that much faster (it goes from 9:40 minutes with gcc4.4. to 8:30
minutes with clang on my linux box – only about 12% faster, and
probably even less if you use a distributed build system).

Let me know if you run into any issues.


More information about the webkit-dev mailing list