Chromium Code Reviews| 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 |