Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 613223539baa20fd2d34d9c895e093cb56fc8f50..bad564717011767c8b5f9ebdc9334d1024f5750d 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -183,32 +183,30 @@ config("compiler") { |
if (is_linux) { |
cflags += [ "-pthread" ] |
- if (cpu_arch == "x64") { |
- # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of |
- # address space, and it doesn't support cross-compiling). |
- gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", |
- root_build_dir) |
- ldflags += [ |
- "-B$gold_path", |
- |
- # There seems to be a conflict of --icf and -pie in gold which can |
- # generate crashy binaries. As a security measure, -pie takes |
- # precedence for now. |
- # TODO(brettw) common.gypi has this only for target toolset. |
- #"-Wl,--icf=safe", |
- "-Wl,--icf=none", |
- |
- # Experimentation found that using four linking threads |
- # saved ~20% of link time. |
- # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
- # Only apply this to the target linker, since the host |
- # linker might not be gold, but isn't used much anyway. |
- # TODO(raymes): Disable threading because gold is frequently |
- # crashing on the bots: crbug.com/161942. |
- #"-Wl,--threads", |
- #"-Wl,--thread-count=4", |
- ] |
- } |
+ # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of |
+ # address space, and it doesn't support cross-compiling). |
+ gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", |
+ root_build_dir) |
+ ldflags += [ |
+ "-B$gold_path", |
+ |
+ # There seems to be a conflict of --icf and -pie in gold which can |
+ # generate crashy binaries. As a security measure, -pie takes |
+ # precedence for now. |
+ # TODO(brettw) common.gypi has this only for target toolset. |
+ #"-Wl,--icf=safe", |
+ "-Wl,--icf=none", |
+ |
+ # Experimentation found that using four linking threads |
+ # saved ~20% of link time. |
+ # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
+ # Only apply this to the target linker, since the host |
+ # linker might not be gold, but isn't used much anyway. |
+ # TODO(raymes): Disable threading because gold is frequently |
+ # crashing on the bots: crbug.com/161942. |
+ #"-Wl,--threads", |
+ #"-Wl,--thread-count=4", |
+ ] |
ldflags += [ |
"-pthread", |