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

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

Issue 1150183009: Laying the groundwork for targeting WinRT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Macadamian to the AUTHORS. Created 5 years, 4 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 | « build/config/win/BUILD.gn ('k') | 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 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 goma_prefix = "$goma_dir/gomacc.exe " 43 goma_prefix = "$goma_dir/gomacc.exe "
44 } else { 44 } else {
45 goma_prefix = "" 45 goma_prefix = ""
46 } 46 }
47 47
48 # This value will be inherited in the toolchain below. 48 # This value will be inherited in the toolchain below.
49 concurrent_links = exec_script("../get_concurrent_links.py", [], "value") 49 concurrent_links = exec_script("../get_concurrent_links.py", [], "value")
50 50
51 # Parameters: 51 # Parameters:
52 # current_cpu: current_cpu to pass as a build arg 52 # current_cpu: current_cpu to pass as a build arg
53 # current_os: current_os to pass as a build arg
53 # environment: File name of environment file. 54 # environment: File name of environment file.
54 template("msvc_toolchain") { 55 template("msvc_toolchain") {
55 if (defined(invoker.concurrent_links)) { 56 if (defined(invoker.concurrent_links)) {
56 concurrent_links = invoker.concurrent_links 57 concurrent_links = invoker.concurrent_links
57 } 58 }
58 59
59 env = invoker.environment 60 env = invoker.environment
60 61
61 if (is_debug) { 62 if (is_debug) {
62 configuration = "Debug" 63 configuration = "Debug"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 description = "COPY {{source}} {{output}}" 200 description = "COPY {{source}} {{output}}"
200 } 201 }
201 202
202 # When invoking this toolchain not as the default one, these args will be 203 # When invoking this toolchain not as the default one, these args will be
203 # passed to the build. They are ignored when this is the default toolchain. 204 # passed to the build. They are ignored when this is the default toolchain.
204 toolchain_args() { 205 toolchain_args() {
205 current_cpu = invoker.current_cpu 206 current_cpu = invoker.current_cpu
206 if (defined(invoker.is_clang)) { 207 if (defined(invoker.is_clang)) {
207 is_clang = invoker.is_clang 208 is_clang = invoker.is_clang
208 } 209 }
210 current_os = invoker.current_os
209 } 211 }
210 } 212 }
211 } 213 }
212 214
213 # TODO(dpranke): Declare both toolchains all of the time when we 215 # TODO(dpranke): Declare both toolchains all of the time when we
214 # get it sorted out how we want to support them both in a single build. 216 # get it sorted out how we want to support them both in a single build.
215 # Right now only one of these can be enabled at a time because the 217 # Right now only one of these can be enabled at a time because the
216 # runtime libraries get copied to root_build_dir and would collide. 218 # runtime libraries get copied to root_build_dir and would collide.
217 if (current_cpu == "x86") { 219 if (current_cpu == "x86") {
218 msvc_toolchain("x86") { 220 msvc_toolchain("x86") {
219 environment = "environment.x86" 221 environment = "environment.x86"
220 current_cpu = "x86" 222 current_cpu = "x86"
221 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 223 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
222 is_clang = false 224 is_clang = false
223 } 225 }
224 msvc_toolchain("clang_x86") { 226 msvc_toolchain("clang_x86") {
225 environment = "environment.x86" 227 environment = "environment.x86"
226 current_cpu = "x86" 228 current_cpu = "x86"
227 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 229 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
228 root_build_dir) 230 root_build_dir)
229 cl = "${goma_prefix}$prefix/clang-cl.exe" 231 cl = "${goma_prefix}$prefix/clang-cl.exe"
232 current_os = "win"
230 is_clang = true 233 is_clang = true
231 } 234 }
232 } 235 }
233 236
234 if (current_cpu == "x64") { 237 if (current_cpu == "x64") {
235 msvc_toolchain("x64") { 238 msvc_toolchain("x64") {
236 environment = "environment.x64" 239 environment = "environment.x64"
237 current_cpu = "x64" 240 current_cpu = "x64"
238 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 241 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
239 is_clang = false 242 is_clang = false
240 } 243 }
241 msvc_toolchain("clang_x64") { 244 msvc_toolchain("clang_x64") {
242 environment = "environment.x64" 245 environment = "environment.x64"
243 current_cpu = "x64" 246 current_cpu = "x64"
244 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 247 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
245 root_build_dir) 248 root_build_dir)
246 cl = "${goma_prefix}$prefix/clang-cl.exe" 249 cl = "${goma_prefix}$prefix/clang-cl.exe"
250 current_os = "win"
247 is_clang = true 251 is_clang = true
248 } 252 }
249 } 253 }
254
255 # WinRT toolchains
256 msvc_toolchain("winrt_x86") {
257 environment = "environment.winrt_x86"
258 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
259 is_clang = false
260
261 current_cpu = "x86"
262 current_os = current_os
263 }
264
265 msvc_toolchain("winrt_x64") {
266 environment = "environment.winrt_x64"
267 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
268 is_clang = false
269
270 current_cpu = "x64"
271 current_os = current_os
272 }
OLDNEW
« no previous file with comments | « build/config/win/BUILD.gn ('k') | build/toolchain/win/setup_toolchain.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698