Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Toolchain-related configuration that may be needed outside the context of the | 5 # Toolchain-related configuration that may be needed outside the context of the |
| 6 # toolchain() rules themselves. | 6 # toolchain() rules themselves. |
| 7 | 7 |
| 8 import("//build/config/chrome_build.gni") | |
| 9 | |
| 8 declare_args() { | 10 declare_args() { |
| 9 # Enable Link Time Optimization in optimized builds (output programs run | 11 # Enable Link Time Optimization in optimized builds (output programs run |
| 10 # faster, but linking is up to 5-20x slower). | 12 # faster, but linking is up to 5-20x slower). |
| 11 # | 13 # Note: use target_os == "linux" rather than is_linux so that it does not |
| 12 # TODO(pcc): Remove this flag if/when LTO is enabled in official builds. | 14 # apply to host_toolchain when target_os="android". |
| 13 allow_posix_link_time_opt = false | 15 allow_posix_link_time_opt = |
| 16 target_os == "linux" && !is_chromeos && target_cpu == "x64" && | |
| 17 is_chrome_branded && is_official_build | |
|
Dirk Pranke
2016/05/26 18:26:29
nit: is_chromeos will never be true of target_os =
| |
| 14 | 18 |
| 15 # Set to true to use lld, the LLVM linker. This flag may be used on Windows | 19 # Set to true to use lld, the LLVM linker. This flag may be used on Windows |
| 16 # with the shipped LLVM toolchain, or on Linux with a self-built top-of-tree | 20 # with the shipped LLVM toolchain, or on Linux with a self-built top-of-tree |
| 17 # LLVM toolchain (see llvm_force_head_revision in | 21 # LLVM toolchain (see llvm_force_head_revision in |
| 18 # build/config/compiler/BUILD.gn). | 22 # build/config/compiler/BUILD.gn). |
| 19 use_lld = false | 23 use_lld = false |
| 20 | 24 |
| 21 if (is_clang) { | 25 if (is_clang) { |
| 22 # Clang compiler version. Clang files are placed at version-dependent paths. | 26 # Clang compiler version. Clang files are placed at version-dependent paths. |
| 23 clang_version = "3.9.0" | 27 clang_version = "3.9.0" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 stamp_description = "STAMP {{output}}" | 71 stamp_description = "STAMP {{output}}" |
| 68 copy_description = "COPY {{source}} {{output}}" | 72 copy_description = "COPY {{source}} {{output}}" |
| 69 if (host_os == "win") { | 73 if (host_os == "win") { |
| 70 stamp_command = "$python_path gyp-win-tool stamp {{output}}" | 74 stamp_command = "$python_path gyp-win-tool stamp {{output}}" |
| 71 copy_command = | 75 copy_command = |
| 72 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" | 76 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" |
| 73 } else { | 77 } else { |
| 74 stamp_command = "touch {{output}}" | 78 stamp_command = "touch {{output}}" |
| 75 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" | 79 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" |
| 76 } | 80 } |
| OLD | NEW |