This change relies on a feature in gold (threading support) that is
off by default.
At gyp time, we detect whether your linker supports threading, so
there is nothing you need to do other than install a new linker to get
faster links.
== Timing
On my very fast desktop a debug build of Chrome linked in about 25
seconds. With this change, it was around 20. 5 seconds isn't a lot
but I'll take it when it's basically free. :)
Release mode links were around 2.5 seconds either way (it might be my
computer is too fast for the change to have much effect).
== Install instructions for Googlers
You should already have an "ld" binary in a "bin" subdir next to your
checkout. You just need to overwrite this with the new one I built,
which you can get from
/google/data/ro/projects/chrome/setup/gold/
or
~evanm/projects/chrome/ld
== Install instructions for everyone else
You'll need to get a copy of the binutils source and build it with
--enable-threads. (That doesn't show up in the top-level ./configure
--help but it is passed down to the gold ./configure.)
== Verification
You can test whether your linker supports threads by running it with
the --threads argument:
$ /usr/bin/ld.bfd --threads
/usr/bin/ld.bfd: unrecognized option '--threads'
$ /usr/bin/ld.gold --threads
/usr/bin/ld.gold: warning: ignoring --threads: /usr/bin/ld.gold was
compiled without thread support
PS: also recently I turned on "thin" ar archives again, which should
cut down on disk cache thrashing a lot on systems that support it.
Let me know if you run into any problems.
== Install instructions for everyone else
You'll need to get a copy of the binutils source and build it with
--enable-threads. (That doesn't show up in the top-level ./configure
--help but it is passed down to the gold ./configure.)
Ya, I'm already working on updating the gold installer in
build/install-build-deps.sh.
Run build/install-build-deps.sh at r75790 or later to build and
install the latest release of gold with threads enabled.