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

Unified Diff: build/toolchain/toolchain.gni

Issue 2844883002: Enable LLD for POSIX LTO builds on Linux. (Closed)
Patch Set: Created 3 years, 8 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 6eb3c9080393b1b80c79650257bcdd0b5dd745d9..460078aa0e29366ab0b9136d8d02891831e913ce 100644
--- a/build/toolchain/toolchain.gni
+++ b/build/toolchain/toolchain.gni
@@ -16,12 +16,6 @@ declare_args() {
allow_posix_link_time_opt = 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
@@ -52,6 +46,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