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

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

Issue 1952353004: use icf=safe w/ gcc+gold+x86/x64, icf=all w/ gold elsewhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@roll_binutils
Patch Set: s/target_arch/target_cpu Created 4 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 98a5a66ccf3e581787141fa5018f5e09ee3299b7..9968459621e744ef197a551dad9d71904dcea9e7 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -350,7 +350,13 @@ config("compiler") {
if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer &&
!(is_android && use_order_profiling)) {
- ldflags += [ "-Wl,--icf=all" ]
+ # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all
+ # doesn't currently work. Once it does, use icf=all everywhere.
+ if (is_clang || (target_cpu != "x86" && target_cpu != "x64")) {
+ ldflags += [ "-Wl,--icf=all" ]
+ } else {
+ ldflags += [ "-Wl,--icf=safe" ]
+ }
}
if (linux_use_bundled_binutils) {
« 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