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

Side by Side Diff: build/toolchain/win/BUILD.gn

Issue 1412623007: GN: Factor "stamp" and "copy" details out of toolchains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « build/toolchain/toolchain.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 declare_args() { 5 declare_args() {
6 # Path to the directory containing the VC binaries for the right 6 # Path to the directory containing the VC binaries for the right
7 # combination of host and target architectures. Currently only the 7 # combination of host and target architectures. Currently only the
8 # 64-bit host toolchain is supported, with either 32-bit or 64-bit targets. 8 # 64-bit host toolchain is supported, with either 32-bit or 64-bit targets.
9 # If vc_bin_dir is not specified on the command line (and it normally 9 # If vc_bin_dir is not specified on the command line (and it normally
10 # isn't), we will dynamically determine the right value to use at runtime. 10 # isn't), we will dynamically determine the right value to use at runtime.
11 vc_bin_dir = "" 11 vc_bin_dir = ""
12 } 12 }
13 13
14 import("//build/config/win/visual_studio_version.gni") 14 import("//build/config/win/visual_studio_version.gni")
15 import("//build/toolchain/goma.gni") 15 import("//build/toolchain/goma.gni")
16 import("//build/toolchain/toolchain.gni")
16 17
17 # Should only be running on Windows. 18 # Should only be running on Windows.
18 assert(is_win) 19 assert(is_win)
19 20
20 # Setup the Visual Studio state. 21 # Setup the Visual Studio state.
21 # 22 #
22 # Its arguments are the VS path and the compiler wrapper tool. It will write 23 # Its arguments are the VS path and the compiler wrapper tool. It will write
23 # "environment.x86" and "environment.x64" to the build directory and return a 24 # "environment.x86" and "environment.x64" to the build directory and return a
24 # list to us. 25 # list to us.
25 gyp_win_tool_path = 26 gyp_win_tool_path =
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 description = "LINK {{output}}" 208 description = "LINK {{output}}"
208 outputs = [ 209 outputs = [
209 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}", 210 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}",
210 ] 211 ]
211 212
212 # The use of inputs_newline is to work around a fixed per-line buffer 213 # The use of inputs_newline is to work around a fixed per-line buffer
213 # size in the linker. 214 # size in the linker.
214 rspfile_content = "{{inputs_newline}} {{libs}} {{solibs}} {{ldflags}}" 215 rspfile_content = "{{inputs_newline}} {{libs}} {{solibs}} {{ldflags}}"
215 } 216 }
216 217
218 # These two are really entirely generic, but have to be repeated in
219 # each toolchain because GN doesn't allow a template to be used here.
220 # See //build/toolchain/toolchain.gni for details.
217 tool("stamp") { 221 tool("stamp") {
218 command = "$python_path gyp-win-tool stamp {{output}}" 222 command = stamp_command
219 description = "STAMP {{output}}" 223 description = stamp_description
220 } 224 }
221
222 tool("copy") { 225 tool("copy") {
223 command = 226 command = copy_command
224 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" 227 description = copy_description
225 description = "COPY {{source}} {{output}}"
226 } 228 }
227 229
228 # When invoking this toolchain not as the default one, these args will be 230 # When invoking this toolchain not as the default one, these args will be
229 # passed to the build. They are ignored when this is the default toolchain. 231 # passed to the build. They are ignored when this is the default toolchain.
230 toolchain_args() { 232 toolchain_args() {
231 current_cpu = invoker.current_cpu 233 current_cpu = invoker.current_cpu
232 if (defined(invoker.is_clang)) { 234 if (defined(invoker.is_clang)) {
233 is_clang = invoker.is_clang 235 is_clang = invoker.is_clang
234 } 236 }
235 current_os = invoker.current_os 237 current_os = invoker.current_os
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 290 }
289 291
290 msvc_toolchain("winrt_x64") { 292 msvc_toolchain("winrt_x64") {
291 environment = "environment.winrt_x64" 293 environment = "environment.winrt_x64"
292 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 294 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
293 is_clang = false 295 is_clang = false
294 296
295 current_cpu = "x64" 297 current_cpu = "x64"
296 current_os = current_os 298 current_os = current_os
297 } 299 }
OLDNEW
« no previous file with comments | « build/toolchain/toolchain.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698