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

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

Issue 913373002: Update Chomium's build files to work w/ latest GN binaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_cpu_arch_changes
Patch Set: merge to #317214 Created 5 years, 10 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 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.
(...skipping 13 matching lines...) Expand all
24 # list to us. 24 # list to us.
25 gyp_win_tool_path = 25 gyp_win_tool_path =
26 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir) 26 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir)
27 27
28 toolchain_data = exec_script("setup_toolchain.py", 28 toolchain_data = exec_script("setup_toolchain.py",
29 [ 29 [
30 visual_studio_path, 30 visual_studio_path,
31 gyp_win_tool_path, 31 gyp_win_tool_path,
32 windows_sdk_path, 32 windows_sdk_path,
33 visual_studio_runtime_dirs, 33 visual_studio_runtime_dirs,
34 cpu_arch, 34 current_cpu,
35 ], 35 ],
36 "scope") 36 "scope")
37 37
38 if (vc_bin_dir == "") { 38 if (vc_bin_dir == "") {
39 vc_bin_dir = toolchain_data.vc_bin_dir 39 vc_bin_dir = toolchain_data.vc_bin_dir
40 } 40 }
41 41
42 # This value will be inherited in the toolchain below. 42 # This value will be inherited in the toolchain below.
43 concurrent_links = exec_script("../get_concurrent_links.py", [], "value") 43 concurrent_links = exec_script("../get_concurrent_links.py", [], "value")
44 44
45 # Parameters: 45 # Parameters:
46 # cpu_arch: cpu_arch to pass as a build arg 46 # current_cpu: current_cpu to pass as a build arg
47 # environment: File name of environment file. 47 # environment: File name of environment file.
48 template("msvc_toolchain") { 48 template("msvc_toolchain") {
49 if (defined(invoker.concurrent_links)) { 49 if (defined(invoker.concurrent_links)) {
50 concurrent_links = invoker.concurrent_links 50 concurrent_links = invoker.concurrent_links
51 } 51 }
52 52
53 env = invoker.environment 53 env = invoker.environment
54 54
55 if (is_debug) { 55 if (is_debug) {
56 configuration = "Debug" 56 configuration = "Debug"
57 } else { 57 } else {
58 configuration = "Release" 58 configuration = "Release"
59 } 59 }
60 exec_script("../../vs_toolchain.py", 60 exec_script("../../vs_toolchain.py",
61 [ 61 [
62 "copy_dlls", 62 "copy_dlls",
63 rebase_path(root_build_dir), 63 rebase_path(root_build_dir),
64 configuration, 64 configuration,
65 invoker.cpu_arch, 65 invoker.current_cpu,
66 ]) 66 ])
67 67
68 if (use_goma) { 68 if (use_goma) {
69 goma_prefix = "$goma_dir/gomacc.exe " 69 goma_prefix = "$goma_dir/gomacc.exe "
70 } else { 70 } else {
71 goma_prefix = "" 71 goma_prefix = ""
72 } 72 }
73 73
74 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 74 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
75 75
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 # TODO(dpranke): cpu_arch is here for backwards compatibility. 205 # TODO(dpranke): cpu_arch is here for backwards compatibility.
206 cpu_arch = current_cpu 206 cpu_arch = current_cpu
207 } 207 }
208 } 208 }
209 } 209 }
210 210
211 # TODO(dpranke): Declare both toolchains all of the time when we 211 # TODO(dpranke): Declare both toolchains all of the time when we
212 # get it sorted out how we want to support them both in a single build. 212 # get it sorted out how we want to support them both in a single build.
213 # Right now only one of these can be enabled at a time because the 213 # Right now only one of these can be enabled at a time because the
214 # runtime libraries get copied to root_build_dir and would collide. 214 # runtime libraries get copied to root_build_dir and would collide.
215 if (cpu_arch == "x86") { 215 if (current_cpu == "x86") {
216 msvc_toolchain("32") { 216 msvc_toolchain("32") {
217 environment = "environment.x86" 217 environment = "environment.x86"
218 218
219 current_cpu = "x86" 219 current_cpu = "x86"
220 } 220 }
221 } 221 }
222 222
223 if (cpu_arch == "x64") { 223 if (current_cpu == "x64") {
224 msvc_toolchain("64") { 224 msvc_toolchain("64") {
225 environment = "environment.x64" 225 environment = "environment.x64"
226 226
227 current_cpu = "x64" 227 current_cpu = "x64"
228 } 228 }
229 } 229 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698