Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2265)

Unified Diff: build/common.gypi

Issue 450843002: clang supports -fuse-ld these days, remove a few special cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/arm-linux-androideabi-gold/ld ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 79d3f986192bbaf837dd0ca5cf28c76735f82604..6611eac67eb7861fb85baaeabaf9cae6e054913e 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -3805,15 +3805,9 @@
'-no-integrated-as',
'-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
],
-
- 'ldflags!': [
- # Clang does not support the following options.
- '-fuse-ld=gold',
- ],
'ldflags': [
- # As long as -fuse-ld=gold doesn't work, add a dummy directory
- # with an 'ld' that redirects to gold, so that clang uses gold.
- '-B<!(cd <(DEPTH) && pwd -P)/build/android/arm-linux-androideabi-gold',
+ # Let clang can find the ld.gold in the NDK.
+ '--gcc-toolchain=<(android_toolchain)/..',
],
}],
['asan==1', {
@@ -4182,6 +4176,11 @@
'defines': ['NO_TCMALLOC'],
}],
['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': [
['_toolset=="target"', {
'ldflags': [
@@ -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', {
« no previous file with comments | « build/android/arm-linux-androideabi-gold/ld ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698