Has anyone tried to use gold instead of ld
?
gold
promises to be much faster than ld
, so it may help speeding up test cycles fo
As it took me a little while to find out how to selectively use gold (i.e. not system-wide using a symlink), I'll post the solution here. It's based on http://code.google.com/p/chromium/wiki/LinuxFasterBuilds#Linking_using_gold .
~/bin/gold/
.Put the following glue script there and name it ~/bin/gold/ld
:
#!/bin/bash
gold "$@"
Obviously, make it executable, chmod a+x ~/bin/gold/ld
.
Change your calls to gcc
to gcc -B$HOME/bin/gold
which makes gcc look in the given directory for helper programs like ld
and thus uses the glue script instead of the system-default ld
.