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

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

Issue 1946433002: Windows GN clobber error fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | 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 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 9
10 # Should only be running on Windows. 10 # Should only be running on Windows.
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 # When invoking this toolchain not as the default one, these args will be 233 # When invoking this toolchain not as the default one, these args will be
234 # passed to the build. They are ignored when this is the default toolchain. 234 # passed to the build. They are ignored when this is the default toolchain.
235 toolchain_args() { 235 toolchain_args() {
236 current_cpu = invoker.toolchain_cpu 236 current_cpu = invoker.toolchain_cpu
237 if (defined(invoker.toolchain_os)) { 237 if (defined(invoker.toolchain_os)) {
238 current_os = invoker.toolchain_os 238 current_os = invoker.toolchain_os
239 } 239 }
240 240
241 forward_variables_from(invoker, 241 if (defined(invoker.is_clang)) {
242 [ 242 is_clang = invoker.is_clang
243 "is_clang", 243 }
244 "is_component_build", 244 if (defined(invoker.is_component_build)) {
245 ]) 245 is_component_build = invoker.is_component_build
246 }
Dirk Pranke 2016/05/03 17:48:50 I'm confused; isn't this exactly the same?
brettw 2016/05/03 18:00:43 With the new changes to forward_variables_from, it
Dirk Pranke 2016/05/03 20:06:33 Ah, right, I was thinking they weren't already in
246 247
247 # This value needs to be passed through unchanged. 248 # This value needs to be passed through unchanged.
248 host_toolchain = host_toolchain 249 host_toolchain = host_toolchain
249 } 250 }
250 } 251 }
251 } 252 }
252 253
253 if (host_os == "win") { 254 if (host_os == "win") {
254 clang_cl = "clang-cl.exe" 255 clang_cl = "clang-cl.exe"
255 } else { 256 } else {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 goma_prefix = invoker.goma_prefix 307 goma_prefix = invoker.goma_prefix
307 x64_toolchain_data = invoker.x64_toolchain_data 308 x64_toolchain_data = invoker.x64_toolchain_data
308 clang_cl = invoker.clang_cl 309 clang_cl = invoker.clang_cl
309 310
310 msvc_toolchain(target_name) { 311 msvc_toolchain(target_name) {
311 environment = "environment.x64" 312 environment = "environment.x64"
312 toolchain_cpu = "x64" 313 toolchain_cpu = "x64"
313 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" 314 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\""
314 is_clang = false 315 is_clang = false
315 316
316 forward_variables_from(invoker, [ "is_component_build" ]) 317 if (defined(invoker.is_component_build)) {
318 is_component_build = invoker.is_component_build
319 }
317 } 320 }
318 321
319 msvc_toolchain("clang_" + target_name) { 322 msvc_toolchain("clang_" + target_name) {
320 environment = "environment.x64" 323 environment = "environment.x64"
321 toolchain_cpu = "x64" 324 toolchain_cpu = "x64"
322 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 325 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
323 root_build_dir) 326 root_build_dir)
324 cl = "${goma_prefix}$prefix/${clang_cl}" 327 cl = "${goma_prefix}$prefix/${clang_cl}"
325 toolchain_os = "win" 328 toolchain_os = "win"
326 is_clang = true 329 is_clang = true
327 330
328 forward_variables_from(invoker, [ "is_component_build" ]) 331 if (defined(invoker.is_component_build)) {
332 is_component_build = invoker.is_component_build
333 }
329 } 334 }
330 } 335 }
331 336
332 win_x64_toolchains("x64") { 337 win_x64_toolchains("x64") {
333 # TODO(mcgrathr): These assignments are only required because of 338 # TODO(mcgrathr): These assignments are only required because of
334 # crbug.com/395883. Drop them if that ever gets fixed in GN. 339 # crbug.com/395883. Drop them if that ever gets fixed in GN.
335 concurrent_links = concurrent_links 340 concurrent_links = concurrent_links
336 goma_prefix = goma_prefix 341 goma_prefix = goma_prefix
337 x64_toolchain_data = x64_toolchain_data 342 x64_toolchain_data = x64_toolchain_data
338 } 343 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 376
372 msvc_toolchain("winrt_x64") { 377 msvc_toolchain("winrt_x64") {
373 environment = "environment.winrt_x64" 378 environment = "environment.winrt_x64"
374 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 379 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
375 is_clang = false 380 is_clang = false
376 381
377 toolchain_cpu = "x64" 382 toolchain_cpu = "x64"
378 toolchain_os = current_os 383 toolchain_os = current_os
379 } 384 }
380 } 385 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698