OLD | NEW |
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") |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 # These share a name with global variables that are already defined, and | 279 # These share a name with global variables that are already defined, and |
280 # forward_variables_from won't clobber the existing value, so we need to | 280 # forward_variables_from won't clobber the existing value, so we need to |
281 # set it explicitly. | 281 # set it explicitly. |
282 if (defined(invoker.is_clang)) { | 282 if (defined(invoker.is_clang)) { |
283 is_clang = invoker.is_clang | 283 is_clang = invoker.is_clang |
284 } | 284 } |
285 if (defined(invoker.is_component_build)) { | 285 if (defined(invoker.is_component_build)) { |
286 is_component_build = invoker.is_component_build | 286 is_component_build = invoker.is_component_build |
287 } | 287 } |
| 288 if (defined(invoker.is_asan)) { |
| 289 is_asan = invoker.is_asan |
| 290 } |
288 | 291 |
289 # This value needs to be passed through unchanged. | 292 # This value needs to be passed through unchanged. |
290 host_toolchain = host_toolchain | 293 host_toolchain = host_toolchain |
291 } | 294 } |
292 } | 295 } |
293 } | 296 } |
294 | 297 |
295 if (is_clang) { | 298 if (is_clang) { |
296 sys_include_prefix = "-imsvc" | 299 sys_include_prefix = "-imsvc" |
297 } else { | 300 } else { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 environment = "environment.x64" | 365 environment = "environment.x64" |
363 toolchain_cpu = "x64" | 366 toolchain_cpu = "x64" |
364 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" | 367 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" |
365 is_clang = false | 368 is_clang = false |
366 | 369 |
367 # This shares a name with a global and forward_variables_from won't clobber | 370 # This shares a name with a global and forward_variables_from won't clobber |
368 # the existing value, so we need to set it explicitly. | 371 # the existing value, so we need to set it explicitly. |
369 if (defined(invoker.is_component_build)) { | 372 if (defined(invoker.is_component_build)) { |
370 is_component_build = invoker.is_component_build | 373 is_component_build = invoker.is_component_build |
371 } | 374 } |
| 375 |
| 376 # ASan doesn't yet work w/ 64-bit builds. |
| 377 is_asan = false |
372 } | 378 } |
373 | 379 |
374 msvc_toolchain("clang_" + target_name) { | 380 msvc_toolchain("clang_" + target_name) { |
375 environment = "environment.x64" | 381 environment = "environment.x64" |
376 toolchain_cpu = "x64" | 382 toolchain_cpu = "x64" |
377 prefix = rebase_path("$clang_base_path/bin", root_build_dir) | 383 prefix = rebase_path("$clang_base_path/bin", root_build_dir) |
378 cl = "${goma_prefix}$prefix/${clang_cl}" | 384 cl = "${goma_prefix}$prefix/${clang_cl}" |
379 toolchain_os = "win" | 385 toolchain_os = "win" |
380 is_clang = true | 386 is_clang = true |
| 387 |
| 388 # ASan doesn't yet work w/ 64-bit builds. |
| 389 is_asan = false |
| 390 |
381 sys_include_flags = "${x64_toolchain_data.include_flags}" | 391 sys_include_flags = "${x64_toolchain_data.include_flags}" |
382 | 392 |
383 # This shares a name with a global and forward_variables_from won't clobber | 393 # This shares a name with a global and forward_variables_from won't clobber |
384 # the existing value, so we need to set it explicitly. | 394 # the existing value, so we need to set it explicitly. |
385 if (defined(invoker.is_component_build)) { | 395 if (defined(invoker.is_component_build)) { |
386 is_component_build = invoker.is_component_build | 396 is_component_build = invoker.is_component_build |
387 } | 397 } |
388 } | 398 } |
389 } | 399 } |
390 | 400 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 | 440 |
431 msvc_toolchain("winrt_x64") { | 441 msvc_toolchain("winrt_x64") { |
432 environment = "environment.winrt_x64" | 442 environment = "environment.winrt_x64" |
433 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 443 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
434 is_clang = false | 444 is_clang = false |
435 | 445 |
436 toolchain_cpu = "x64" | 446 toolchain_cpu = "x64" |
437 toolchain_os = current_os | 447 toolchain_os = current_os |
438 } | 448 } |
439 } | 449 } |
OLD | NEW |