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

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

Issue 2301193002: Remove gyp-win-tool. (Closed)
Patch Set: Created 4 years, 3 months 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 | « no previous file | build/toolchain/win/setup_toolchain.py » ('j') | 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 import("//build/config/clang/clang.gni") 5 import("//build/config/clang/clang.gni")
6 import("//build/config/compiler/compiler.gni") 6 import("//build/config/compiler/compiler.gni")
7 import("//build/config/sanitizers/sanitizers.gni") 7 import("//build/config/sanitizers/sanitizers.gni")
8 import("//build/config/win/visual_studio_version.gni") 8 import("//build/config/win/visual_studio_version.gni")
9 import("//build/toolchain/goma.gni") 9 import("//build/toolchain/goma.gni")
10 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
11 11
12 # Should only be running on Windows. 12 # Should only be running on Windows.
13 assert(is_win) 13 assert(is_win)
14 14
15 # Setup the Visual Studio state. 15 # Setup the Visual Studio state.
16 # 16 #
17 # Its arguments are the VS path and the compiler wrapper tool. It will write 17 # Its arguments are the VS path and the compiler wrapper tool. It will write
18 # "environment.x86" and "environment.x64" to the build directory and return a 18 # "environment.x86" and "environment.x64" to the build directory and return a
19 # list to us. 19 # list to us.
20 20
21 # TODO bug 642014 remove this when all users of the script have been removed.
22 gyp_win_tool_path =
23 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir)
24
25 # This tool will is used as a wrapper for various commands below. 21 # This tool will is used as a wrapper for various commands below.
26 tool_wrapper_path = rebase_path("tool_wrapper.py", root_build_dir) 22 tool_wrapper_path = rebase_path("tool_wrapper.py", root_build_dir)
27 23
28 if (use_goma) { 24 if (use_goma) {
29 goma_prefix = "$goma_dir/gomacc.exe " 25 goma_prefix = "$goma_dir/gomacc.exe "
30 } else { 26 } else {
31 goma_prefix = "" 27 goma_prefix = ""
32 } 28 }
33 29
34 # Copy the VS runtime DLL for the default toolchain to the root build directory 30 # Copy the VS runtime DLL for the default toolchain to the root build directory
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 clang_cl = "clang-cl" 307 clang_cl = "clang-cl"
312 } 308 }
313 309
314 # 32-bit toolchains. Only define these when the target architecture is 32-bit 310 # 32-bit toolchains. Only define these when the target architecture is 32-bit
315 # since we don't do any 32-bit cross compiles when targeting 64-bit (the 311 # since we don't do any 32-bit cross compiles when targeting 64-bit (the
316 # build does generate some 64-bit stuff from 32-bit target builds). 312 # build does generate some 64-bit stuff from 32-bit target builds).
317 if (target_cpu == "x86") { 313 if (target_cpu == "x86") {
318 x86_toolchain_data = exec_script("setup_toolchain.py", 314 x86_toolchain_data = exec_script("setup_toolchain.py",
319 [ 315 [
320 visual_studio_path, 316 visual_studio_path,
321 gyp_win_tool_path,
322 windows_sdk_path, 317 windows_sdk_path,
323 visual_studio_runtime_dirs, 318 visual_studio_runtime_dirs,
324 "x86", 319 "x86",
325 "${sys_include_prefix}", 320 "${sys_include_prefix}",
326 ], 321 ],
327 "scope") 322 "scope")
328 323
329 msvc_toolchain("x86") { 324 msvc_toolchain("x86") {
330 environment = "environment.x86" 325 environment = "environment.x86"
331 cl = "${goma_prefix}\"${x86_toolchain_data.vc_bin_dir}/cl.exe\"" 326 cl = "${goma_prefix}\"${x86_toolchain_data.vc_bin_dir}/cl.exe\""
(...skipping 13 matching lines...) Expand all
345 current_cpu = "x86" 340 current_cpu = "x86"
346 is_clang = true 341 is_clang = true
347 } 342 }
348 } 343 }
349 } 344 }
350 345
351 # 64-bit toolchains. 346 # 64-bit toolchains.
352 x64_toolchain_data = exec_script("setup_toolchain.py", 347 x64_toolchain_data = exec_script("setup_toolchain.py",
353 [ 348 [
354 visual_studio_path, 349 visual_studio_path,
355 gyp_win_tool_path,
356 windows_sdk_path, 350 windows_sdk_path,
357 visual_studio_runtime_dirs, 351 visual_studio_runtime_dirs,
358 "x64", 352 "x64",
359 "${sys_include_prefix}", 353 "${sys_include_prefix}",
360 ], 354 ],
361 "scope") 355 "scope")
362 356
363 template("win_x64_toolchains") { 357 template("win_x64_toolchains") {
364 msvc_toolchain(target_name) { 358 msvc_toolchain(target_name) {
365 environment = "environment.x64" 359 environment = "environment.x64"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 msvc_toolchain("winrt_x64") { 421 msvc_toolchain("winrt_x64") {
428 environment = "environment.winrt_x64" 422 environment = "environment.winrt_x64"
429 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 423 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
430 424
431 toolchain_args = { 425 toolchain_args = {
432 is_clang = false 426 is_clang = false
433 current_cpu = "x64" 427 current_cpu = "x64"
434 } 428 }
435 } 429 }
436 } 430 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/win/setup_toolchain.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698