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

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

Issue 503873004: linux: Always use (64bit) gold for linking, even on 32bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 6 years, 4 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
« build/common.gypi ('K') | « build/common.gypi ('k') | 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 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",
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698