use icf=safe w/ gcc+gold+x86/x64, icf=all w/ gold elsewhere.
This is another attempt to fix which flags we use by default when linking w/ gold. The interaction of gold + gcc on intel platforms appears buggy, so we only use icf=safe there; gold + gcc on non-intel platforms, and gold + clang on intel can use icf=all, as long as we have the latest binutils. This change is GN-only, since linux GYP builds are on their last breaths and it's not worth worrying about x86 flags there. R=mcgrathr@chromium.org, thakis@chromium.org BUG=576197 Review-Url: https://codereview.chromium.org/1952353004 Cr-Original-Commit-Position: refs/heads/master@{#393563} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: a403dd9d7c3b7d3619da3ef989f4666e1e11cf95
This commit is contained in:
Родитель
c2772f7ffa
Коммит
93814d6827
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче