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

Unified Diff: build/toolchain/toolchain.gni

Issue 2877913003: Enable LLD for POSIX LTO builds on Linux. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/toolchain.gni
diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni
index 922a9c7d39933114fb9da51f298dd3cd60f2e7c9..b14928d32e7869e7bfeca1ce784bca04cba17be7 100644
--- a/build/toolchain/toolchain.gni
+++ b/build/toolchain/toolchain.gni
@@ -17,12 +17,6 @@ declare_args() {
is_clang && target_os == "linux" && !is_chromeos && target_cpu == "x64" &&
is_official_build
- # Set to true to use lld, the LLVM linker. This flag may be used on Windows
- # with the shipped LLVM toolchain, or on Linux with a self-built top-of-tree
- # LLVM toolchain (see llvm_force_head_revision in
- # build/config/compiler/BUILD.gn).
- use_lld = is_win && host_os != "win"
-
# If used with allow_posix_link_time_opt, it enables the experimental support
# of ThinLTO that links 3x-10x faster but (as of now) does not have all the
# important optimizations such us devirtualization implemented. See also
@@ -53,6 +47,12 @@ declare_args() {
# Clang compiler version. Clang files are placed at version-dependent paths.
clang_version = "5.0.0"
}
+
+ # Set to true to use lld, the LLVM linker. This flag may be used on Windows
+ # or Linux.
+ use_lld = (is_win && host_os != "win") ||
+ (allow_posix_link_time_opt && target_os == "linux" &&
+ !is_chromeos && target_cpu == "x64")
}
# Check target_os here instead of is_ios as this file is loaded for secondary
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698