Commit b728310a authored by thakis@chromium.org's avatar thakis@chromium.org

clang supports -fuse-ld these days, remove a few special cases.

This is shorter, and it allows us to remove two trampoline files on Android
(which still weren't updated to trampoline to the 4.8 toolchain and still
referred to the 4.6 toolchain instead).

No intended visible behavior change.

BUG=none

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

Cr-Commit-Position: refs/heads/master@{#288424}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288424 0039d316-1c4b-4281-b951-d872f2087c98
parent 6351d7c3
../../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld.gold
\ No newline at end of file
../../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/arm-linux-androideabi/bin/ld.gold
\ No newline at end of file
...@@ -3805,15 +3805,9 @@ ...@@ -3805,15 +3805,9 @@
'-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.
], ],
'ldflags!': [
# Clang does not support the following options.
'-fuse-ld=gold',
],
'ldflags': [ 'ldflags': [
# As long as -fuse-ld=gold doesn't work, add a dummy directory # Let clang can find the ld.gold in the NDK.
# with an 'ld' that redirects to gold, so that clang uses gold. '--gcc-toolchain=<(android_toolchain)/..',
'-B<!(cd <(DEPTH) && pwd -P)/build/android/arm-linux-androideabi-gold',
], ],
}], }],
['asan==1', { ['asan==1', {
...@@ -4182,6 +4176,11 @@ ...@@ -4182,6 +4176,11 @@
'defines': ['NO_TCMALLOC'], 'defines': ['NO_TCMALLOC'],
}], }],
['linux_use_gold_flags==1', { ['linux_use_gold_flags==1', {
# Newer gccs and clangs support -fuse-ld, use the flag to force gold
# selection.
# gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
'ldflags': [ '-fuse-ld=gold', ],
'target_conditions': [ 'target_conditions': [
['_toolset=="target"', { ['_toolset=="target"', {
'ldflags': [ 'ldflags': [
...@@ -4212,29 +4211,6 @@ ...@@ -4212,29 +4211,6 @@
}], }],
], ],
}], }],
# Newer gcc's support -fuse-ld, use the flag to force gold
# selection.
# gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
# TODO(mithro): Watch for clang support at following thread:
# http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-support-to-clang-td4032180.html
['gcc_version>=48 and clang==0', {
'target_conditions': [
['_toolset=="target"', {
'ldflags': [
'-fuse-ld=gold',
],
}],
],
}],
['host_gcc_version>=48 and clang==0', {
'target_conditions': [
['_toolset=="host"', {
'ldflags': [
'-fuse-ld=gold',
],
}],
],
}],
], ],
}], }],
['linux_use_bundled_binutils==1', { ['linux_use_bundled_binutils==1', {
......
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