Revert "Switch to LLD as the default linker on Linux/x64."

This reverts commit dd160677bc6cd8a5ab468c187f61902a8fbf4b41.

Reason for revert: 

Broke Linux Builder (dbg)
https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29/builds/116417

Original change's description:
> Switch to LLD as the default linker on Linux/x64.
> 
> Until recently the main feature that we needed that was not fully
> implemented in LLD was --gdb-index; this feature has now been
> implemented, so we can start using LLD in more build modes than just
> official builds. LLD's implementation of --gdb-index requires all
> translation units to be compiled with -ggnu-pubnames, so this patch
> does that.
> 
> Also enable --gdb-index in official builds; the corrupt debug info
> error no longer appears when using LLD.
> 
> Perf numbers as follows, median of 10 runs.
> 
> Release build (is_debug=false use_goma=true): gold 19.73s, lld 10.22s.
> Debug build (is_debug=true use_goma=true): gold 26.27s, lld 18.38s
> 
> Bug: 607968, 682777
> Change-Id: Ia63abc15e61d77202d2ca738e6a8bdb0cfe98144
> Reviewed-on: https://chromium-review.googlesource.com/698292
> Commit-Queue: Peter Collingbourne <pcc@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#506224}

TBR=thakis@chromium.org,dpranke@chromium.org,pcc@chromium.org

Change-Id: Ic10bd05e43be064b66dbb6ef48063689d55dc85a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 607968, 682777
Reviewed-on: https://chromium-review.googlesource.com/699534
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#506231}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6de9affa7a1bef1728d883462f44cbbae5326e6a
This commit is contained in:
Peter Collingbourne 2017-10-03 23:47:14 +00:00 коммит произвёл Commit Bot
Родитель 0cfa12acb9
Коммит e71e51bf19
2 изменённых файлов: 8 добавлений и 12 удалений

Просмотреть файл

@ -126,8 +126,8 @@ if (gold_path == false) {
}
if (use_debug_fission == "default") {
use_debug_fission = is_debug && !is_android && !is_win &&
(use_gold || use_lld) && cc_wrapper == ""
use_debug_fission =
is_debug && !is_android && !is_win && use_gold && cc_wrapper == ""
}
# default_include_dirs ---------------------------------------------------------
@ -1817,13 +1817,12 @@ config("symbols") {
# obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
# DWARF info may be corrupt; offsets in a range list entry are in different
# sections" there. Maybe just a bug in nacl_switch_32.S.
# TODO(thakis): Figure out if there's a way to make this go for official
# builds, currently get
# "third_party/binutils/Linux_x64/Release/bin/ld.gold: warning:
# /tmp/lto-llvm-0b5201.o: corrupt debug info in .debug_info"
if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" &&
(use_gold || use_lld)) {
# This flag enables the GNU-format pubnames and pubtypes sections, which
# lld needs in order to generate a correct GDB index.
# TODO(pcc): Try to make lld understand non-GNU-format pubnames sections
# (llvm.org/PR34820).
cflags += [ "-ggnu-pubnames" ]
(use_gold || use_lld) && !use_thin_lto && !is_official_build) {
ldflags += [ "-Wl,--gdb-index" ]
}
}

Просмотреть файл

@ -149,11 +149,8 @@ declare_args() {
declare_args() {
# Set to true to use lld, the LLVM linker. This flag may be used on Windows,
# Linux or Fuchsia.
# TODO(pcc): Enable lld on more architectures on Linux. E.g. we probably need
# to fix some of crbug.com/742655 to enable it on ARM.
use_lld = (is_win && host_os != "win") || is_fuchsia ||
(use_thin_lto && target_os != "chromeos") ||
(target_os == "linux" && target_cpu == "x64")
(use_thin_lto && target_os != "chromeos")
}
declare_args() {