diff --git a/common.gypi b/common.gypi index 60e982b65..76614d450 100644 --- a/common.gypi +++ b/common.gypi @@ -389,13 +389,18 @@ # linux_use_gold_binary: whether to use the binary checked into # third_party/gold. - # linux_use_gold_flags: whether to use build flags that rely on gold. - # On by default for x64 Linux. ['host_arch=="x64"', { 'linux_use_gold_binary%': 1, - 'linux_use_gold_flags%': 1, }, { 'linux_use_gold_binary%': 0, + }], + + # linux_use_gold_flags: whether to use build flags that rely on gold. + # On by default for x64 Linux. Temporarily off for ChromeOS as + # it failed on a buildbot. + ['host_arch=="x64" and chromeos==0', { + 'linux_use_gold_flags%': 1, + }, { 'linux_use_gold_flags%': 0, }], @@ -2003,6 +2008,13 @@ 'cflags': ['-finstrument-functions'], }], ['linux_use_gold_flags==1', { + 'ldflags': [ + # Experimentation found that using four linking threads + # saved ~20% of link time. + # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 + '-Wl,--threads', + '-Wl,--thread-count=4', + ], 'conditions': [ ['release_valgrind_build==0', { 'target_conditions': [