Commit 882ab8a2 authored by pcc's avatar pcc Committed by Commit bot

Do not use bundled gold when using GCC LTO.

This is because GCC also uses the -B search path at link time to find
"as", and our bundled "as" can only target x86. See also the discussion at
https://codereview.chromium.org/1084133002/

(I also tried adding this condition around line 858, but this won't work
because of scoping issues ("clang" is not defined here)).

R=thakis@chromium.org,fdegans@chromium.org
BUG=469376

Review URL: https://codereview.chromium.org/1096553002

Cr-Commit-Position: refs/heads/master@{#325545}
parent 2e7da8f1
...@@ -4535,11 +4535,16 @@ ...@@ -4535,11 +4535,16 @@
'-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
], ],
}], }],
['linux_use_bundled_gold==1', { ['linux_use_bundled_gold==1 and '
'not (clang==0 and (use_lto==1 or use_lto_o2==1))', {
# Put our binutils, which contains gold in the search path. We pass # Put our binutils, which contains gold in the search path. We pass
# the path to gold to the compiler. gyp leaves unspecified what the # the path to gold to the compiler. gyp leaves unspecified what the
# cwd is when running the compiler, so the normal gyp path-munging # cwd is when running the compiler, so the normal gyp path-munging
# fails us. This hack gets the right path. # fails us. This hack gets the right path.
#
# Disabled when using GCC LTO because GCC also uses the -B search
# path at link time to find "as", and our bundled "as" can only
# target x86.
'ldflags': [ 'ldflags': [
'-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment