Commit f5bae669 authored by pcc's avatar pcc Committed by Commit bot

Use bundled gold by default when building for Android.

The bundled gold contains a number of bug fixes (mostly LTO-related, but also
http://crbug.com/161942), so use it instead of the NDK gold. Both versions
of gold are based on the same version of binutils (2.24), so this should be
relatively safe.

BUG=161942,469376
R=thakis@chromium.org
TEST=Built libchromeshell.so with default GYP_DEFINES with and without this change, verified that binaries are equivalent

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

Cr-Commit-Position: refs/heads/master@{#325334}
parent 6ed6542b
...@@ -861,7 +861,7 @@ ...@@ -861,7 +861,7 @@
# are using a custom toolchain and need to control -B in ldflags. # are using a custom toolchain and need to control -B in ldflags.
# Do not use 32-bit gold on 32-bit hosts as it runs out address space # Do not use 32-bit gold on 32-bit hosts as it runs out address space
# for component=static_library builds. # for component=static_library builds.
['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', { ['(OS=="linux" or OS=="android") and (target_arch=="x64" or target_arch=="arm")', {
'linux_use_bundled_gold%': 1, 'linux_use_bundled_gold%': 1,
}, { }, {
'linux_use_bundled_gold%': 0, 'linux_use_bundled_gold%': 0,
...@@ -3994,6 +3994,8 @@ ...@@ -3994,6 +3994,8 @@
'-no-integrated-as', '-no-integrated-as',
'-B<(android_toolchain)', # Else /usr/bin/as gets picked up. '-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
], ],
}],
['clang==1 and linux_use_bundled_gold==0', {
'ldflags': [ 'ldflags': [
# Let clang find the ld.gold in the NDK. # Let clang find the ld.gold in the NDK.
'--gcc-toolchain=<(android_toolchain)/..', '--gcc-toolchain=<(android_toolchain)/..',
......
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