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

Unified Diff: build/toolchain/toolchain.gni

Issue 2017633002: Reland of Enable LTO on Linux for the official builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: target_os vs is_linux Created 4 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 | « 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/toolchain/toolchain.gni
diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni
index 4ab0270f902a7b8dfd9b3114b0281e787d70265e..9f564794816655edd06d110aeb2ce14390f037bb 100644
--- a/build/toolchain/toolchain.gni
+++ b/build/toolchain/toolchain.gni
@@ -5,12 +5,16 @@
# Toolchain-related configuration that may be needed outside the context of the
# toolchain() rules themselves.
+import("//build/config/chrome_build.gni")
+
declare_args() {
# Enable Link Time Optimization in optimized builds (output programs run
# faster, but linking is up to 5-20x slower).
- #
- # TODO(pcc): Remove this flag if/when LTO is enabled in official builds.
- allow_posix_link_time_opt = false
+ # Note: use target_os == "linux" rather than is_linux so that it does not
+ # apply to host_toolchain when target_os="android".
+ allow_posix_link_time_opt =
+ target_os == "linux" && !is_chromeos && target_cpu == "x64" &&
+ is_chrome_branded && is_official_build
Dirk Pranke 2016/05/26 18:26:29 nit: is_chromeos will never be true of target_os =
# 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
« 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