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_overrides/build.gni") | 8 import("//build_overrides/build.gni") |
9 import("//build/config/chrome_build.gni") | 9 import("//build/config/chrome_build.gni") |
10 | 10 |
11 declare_args() { | 11 declare_args() { |
12 # Enable Link Time Optimization in optimized builds (output programs run | 12 # Enable Link Time Optimization in optimized builds (output programs run |
13 # faster, but linking is up to 5-20x slower). | 13 # faster, but linking is up to 5-20x slower). |
14 # Note: use target_os == "linux" rather than is_linux so that it does not | 14 # Note: use target_os == "linux" rather than is_linux so that it does not |
15 # apply to host_toolchain when target_os="android". | 15 # apply to host_toolchain when target_os="android". |
16 allow_posix_link_time_opt = | 16 allow_posix_link_time_opt = target_os == "linux" && !is_chromeos && |
17 target_os == "linux" && !is_chromeos && target_cpu == "x64" && | 17 target_cpu == "x64" && is_official_build |
18 is_chrome_branded && is_official_build | |
19 | 18 |
20 # 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 |
21 # 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 |
22 # LLVM toolchain (see llvm_force_head_revision in | 21 # LLVM toolchain (see llvm_force_head_revision in |
23 # build/config/compiler/BUILD.gn). | 22 # build/config/compiler/BUILD.gn). |
24 use_lld = is_win && host_os != "win" | 23 use_lld = is_win && host_os != "win" |
25 | 24 |
26 # If used with allow_posix_link_time_opt, it enables the experimental support | 25 # If used with allow_posix_link_time_opt, it enables the experimental support |
27 # of ThinLTO that links 3x-10x faster but (as of now) does not have all the | 26 # of ThinLTO that links 3x-10x faster but (as of now) does not have all the |
28 # important optimizations such us devirtualization implemented. See also | 27 # important optimizations such us devirtualization implemented. See also |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 _tool_wrapper_path = | 106 _tool_wrapper_path = |
108 rebase_path("//build/toolchain/win/tool_wrapper.py", root_build_dir) | 107 rebase_path("//build/toolchain/win/tool_wrapper.py", root_build_dir) |
109 | 108 |
110 stamp_command = "$python_path $_tool_wrapper_path stamp {{output}}" | 109 stamp_command = "$python_path $_tool_wrapper_path stamp {{output}}" |
111 copy_command = | 110 copy_command = |
112 "$python_path $_tool_wrapper_path recursive-mirror {{source}} {{output}}" | 111 "$python_path $_tool_wrapper_path recursive-mirror {{source}} {{output}}" |
113 } else { | 112 } else { |
114 stamp_command = "touch {{output}}" | 113 stamp_command = "touch {{output}}" |
115 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}}
&& cp -af {{source}} {{output}})" | 114 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}}
&& cp -af {{source}} {{output}})" |
116 } | 115 } |
OLD | NEW |