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 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 # The path to the hermetic install of Xcode. Only relevant when | 55 # The path to the hermetic install of Xcode. Only relevant when |
56 # use_system_xcode = false. | 56 # use_system_xcode = false. |
57 hermetic_xcode_path = | 57 hermetic_xcode_path = |
58 rebase_path("//build/${target_os}_files/Xcode.app", "", root_build_dir) | 58 rebase_path("//build/${target_os}_files/Xcode.app", "", root_build_dir) |
59 | 59 |
60 declare_args() { | 60 declare_args() { |
61 if (is_clang) { | 61 if (is_clang) { |
62 # Clang compiler version. Clang files are placed at version-dependent paths. | 62 # Clang compiler version. Clang files are placed at version-dependent paths. |
63 clang_version = "5.0.0" | 63 clang_version = "5.0.0" |
64 } | 64 } |
| 65 |
| 66 # Set to true to use lld, the LLVM linker. This flag may be used on Windows |
| 67 # or Linux. |
| 68 use_lld = (is_win && host_os != "win") || is_fuchsia || |
| 69 (allow_posix_link_time_opt && target_os == "linux" && |
| 70 !is_chromeos && target_cpu == "x64") |
65 } | 71 } |
66 | 72 |
67 # Check target_os here instead of is_ios as this file is loaded for secondary | 73 # Check target_os here instead of is_ios as this file is loaded for secondary |
68 # toolchain (host toolchain in particular) but the argument is the same for | 74 # toolchain (host toolchain in particular) but the argument is the same for |
69 # all toolchains. | 75 # all toolchains. |
70 assert(!use_xcode_clang || target_os == "ios", | 76 assert(!use_xcode_clang || target_os == "ios", |
71 "Using Xcode's clang is only supported in iOS builds") | 77 "Using Xcode's clang is only supported in iOS builds") |
72 | 78 |
73 # Subdirectory within root_out_dir for shared library files. | 79 # Subdirectory within root_out_dir for shared library files. |
74 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work | 80 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 _tool_wrapper_path = | 122 _tool_wrapper_path = |
117 rebase_path("//build/toolchain/win/tool_wrapper.py", root_build_dir) | 123 rebase_path("//build/toolchain/win/tool_wrapper.py", root_build_dir) |
118 | 124 |
119 stamp_command = "$python_path $_tool_wrapper_path stamp {{output}}" | 125 stamp_command = "$python_path $_tool_wrapper_path stamp {{output}}" |
120 copy_command = | 126 copy_command = |
121 "$python_path $_tool_wrapper_path recursive-mirror {{source}} {{output}}" | 127 "$python_path $_tool_wrapper_path recursive-mirror {{source}} {{output}}" |
122 } else { | 128 } else { |
123 stamp_command = "touch {{output}}" | 129 stamp_command = "touch {{output}}" |
124 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}}
&& cp -af {{source}} {{output}})" | 130 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}}
&& cp -af {{source}} {{output}})" |
125 } | 131 } |
OLD | NEW |