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

Unified Diff: build/config/compiler/BUILD.gn

Issue 2878513002: build: Use ICF more often now that our binutils is patched. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index b05a8d746d8c5f0e2b9c84c2b3a16754672e65ef..fcf06acb70b8255dd219ddf3505c7e036dbad97c 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -396,20 +396,13 @@ config("compiler") {
if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer &&
!(is_android && use_order_profiling)) {
- # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all
- # doesn't currently work on non-chromeos platforms.
- # Additionally, on Android x86 --icf=safe seems to cause issues as well.
- # Additionally, on cast Android x86, --icf=all causes issues.
- if (is_android && current_cpu == "x86") {
- ldflags += [ "-Wl,--icf=none" ]
Nico 2017/05/10 18:13:16 This is the default everywhere, yes?
pcc1 2017/05/10 18:17:20 Yes as best as I can tell from reading the gold an
- } else if ((is_clang && !is_android) || is_chromeos ||
- (current_cpu != "x86" && current_cpu != "x64")) {
- # TODO(thakis): Remove `!is_android` above once our gold has been rolled
- # with the fix for https://sourceware.org/bugzilla/show_bug.cgi?id=17704
- # merged. See also https://crbug.com/663886
+ # TODO(thakis): Remove `!is_android` below once NDK gold has been rolled
+ # with the fix for https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+ # merged. See also https://crbug.com/663886
+ # `linux_use_bundled_binutils` is to avoid breaking Linux distros which may
+ # still have a buggy gold.
+ if (!is_android && linux_use_bundled_binutils) {
ldflags += [ "-Wl,--icf=all" ]
- } else if (!is_android || is_clang) {
- ldflags += [ "-Wl,--icf=safe" ]
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698