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

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

Issue 2031233002: Rework how MB and GN handle concurrent links. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move concurrent_links into a dedicated .gni Created 4 years, 6 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
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/sanitizers/sanitizers.gni") 5 import("//build/config/sanitizers/sanitizers.gni")
6 import("//build/config/win/visual_studio_version.gni") 6 import("//build/config/win/visual_studio_version.gni")
7 import("//build/toolchain/goma.gni") 7 import("//build/toolchain/goma.gni")
8 import("//build/toolchain/toolchain.gni") 8 import("//build/toolchain/toolchain.gni")
9 import("//build/toolchain/concurrent_links.gni")
9 10
10 # Should only be running on Windows. 11 # Should only be running on Windows.
11 assert(is_win) 12 assert(is_win)
12 13
13 # Setup the Visual Studio state. 14 # Setup the Visual Studio state.
14 # 15 #
15 # Its arguments are the VS path and the compiler wrapper tool. It will write 16 # Its arguments are the VS path and the compiler wrapper tool. It will write
16 # "environment.x86" and "environment.x64" to the build directory and return a 17 # "environment.x86" and "environment.x64" to the build directory and return a
17 # list to us. 18 # list to us.
18 gyp_win_tool_path = 19 gyp_win_tool_path =
19 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir) 20 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir)
20 21
21 if (use_goma) { 22 if (use_goma) {
22 goma_prefix = "$goma_dir/gomacc.exe " 23 goma_prefix = "$goma_dir/gomacc.exe "
23 } else { 24 } else {
24 goma_prefix = "" 25 goma_prefix = ""
25 } 26 }
26 27
27 # This value will be inherited in the toolchain below.
28 concurrent_links = exec_script("../get_concurrent_links.py", [], "value")
29
30 # Copy the VS runtime DLL for the default toolchain to the root build directory 28 # Copy the VS runtime DLL for the default toolchain to the root build directory
31 # so things will run. 29 # so things will run.
32 if (current_toolchain == default_toolchain) { 30 if (current_toolchain == default_toolchain) {
33 if (is_debug) { 31 if (is_debug) {
34 configuration_name = "Debug" 32 configuration_name = "Debug"
35 } else { 33 } else {
36 configuration_name = "Release" 34 configuration_name = "Release"
37 } 35 }
38 exec_script("../../vs_toolchain.py", 36 exec_script("../../vs_toolchain.py",
39 [ 37 [
40 "copy_dlls", 38 "copy_dlls",
41 rebase_path(root_build_dir), 39 rebase_path(root_build_dir),
42 configuration_name, 40 configuration_name,
43 target_cpu, 41 target_cpu,
44 ]) 42 ])
45 } 43 }
46 44
47 # Parameters: 45 # Parameters:
48 # toolchain_cpu: current_cpu to pass as a build arg 46 # toolchain_cpu: current_cpu to pass as a build arg
49 # toolchain_os: current_os to pass as a build arg 47 # toolchain_os: current_os to pass as a build arg
50 # environment: File name of environment file. 48 # environment: File name of environment file.
51 template("msvc_toolchain") { 49 template("msvc_toolchain") {
brettw 2016/06/06 17:33:39 Same comment in this file.
52 if (defined(invoker.concurrent_links)) { 50 if (defined(invoker.concurrent_links)) {
53 concurrent_links = invoker.concurrent_links 51 concurrent_links = invoker.concurrent_links
54 } 52 }
55 53
56 env = invoker.environment 54 env = invoker.environment
57 55
58 if (invoker.is_clang && host_os != "win") { 56 if (invoker.is_clang && host_os != "win") {
59 # This toolchain definition uses response files for compilations. GN uses 57 # This toolchain definition uses response files for compilations. GN uses
60 # the quoting rules of the host OS, while clang-cl always defaults to 58 # the quoting rules of the host OS, while clang-cl always defaults to
61 # cmd.exe quoting rules for parsing response files. Tell clang-cl to use 59 # cmd.exe quoting rules for parsing response files. Tell clang-cl to use
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 414
417 msvc_toolchain("winrt_x64") { 415 msvc_toolchain("winrt_x64") {
418 environment = "environment.winrt_x64" 416 environment = "environment.winrt_x64"
419 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 417 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
420 is_clang = false 418 is_clang = false
421 419
422 toolchain_cpu = "x64" 420 toolchain_cpu = "x64"
423 toolchain_os = current_os 421 toolchain_os = current_os
424 } 422 }
425 } 423 }
OLDNEW
« build/toolchain/mac/BUILD.gn ('K') | « build/toolchain/mac/BUILD.gn ('k') | tools/mb/mb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698