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

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

Issue 2120233002: Enable gold threaded link (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +linux_use_bundled_binutils condition Created 4 years, 5 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 | « 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 15ff58c70a7718e90aae0a746ab15986090bd939..30d801789d8a36aeab008f75aeedea2afacebe79 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -208,8 +208,7 @@ config("compiler") {
}
# Linker warnings.
- if ( fatal_linker_warnings &&
- !(is_chromeos && current_cpu == "arm") &&
+ if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
!(is_android && use_order_profiling) && !is_mac && !is_ios) {
# TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
# TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
@@ -318,18 +317,19 @@ config("compiler") {
cflags += [ "-mstackrealign" ]
}
} else {
- ldflags += [
- "-B$gold_path",
- # 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 += [ "-B$gold_path" ]
+
+ if (linux_use_bundled_binutils) {
+ ldflags += [
+ # 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.
+ "-Wl,--threads",
+ "-Wl,--thread-count=4",
+ ]
+ }
}
if (gdb_index) {
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698