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

Unified Diff: build/toolchain/toolchain.gni

Issue 2957533002: Enable ThinLTO for POSIX LTO by default on Linux, take 2. (Closed)
Patch Set: New patch Created 3 years, 6 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
Index: build/toolchain/toolchain.gni
diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni
index 70e0fa96037e7cd5e5c175bcc895482aeb0d91d3..63ecdbd89a3d9c4ac7dcff88ec41f42ba1976500 100644
--- a/build/toolchain/toolchain.gni
+++ b/build/toolchain/toolchain.gni
@@ -16,12 +16,14 @@ declare_args() {
allow_posix_link_time_opt =
is_clang && target_os == "linux" && !is_chromeos && target_cpu == "x64" &&
is_official_build
+}
- # 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
+declare_args() {
+ # If used with allow_posix_link_time_opt, it enables support for ThinLTO,
+ # which links 3x-10x faster than full LTO. See also
# http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html
- use_thin_lto = false
+ use_thin_lto = allow_posix_link_time_opt && target_os == "linux" &&
+ !is_chromeos && target_cpu == "x64"
# If this is set to true, or if LLVM_FORCE_HEAD_REVISION is set to 1
# in the environment, we use the revision in the llvm repo to determine

Powered by Google App Engine
This is Rietveld 408576698