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

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

Issue 2186753006: Turn off ASAN for non-default toolchains for win clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « 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/clang/clang.gni") 5 import("//build/config/clang/clang.gni")
6 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
7 import("//build/config/win/visual_studio_version.gni") 7 import("//build/config/win/visual_studio_version.gni")
8 import("//build/toolchain/goma.gni") 8 import("//build/toolchain/goma.gni")
9 import("//build/toolchain/toolchain.gni") 9 import("//build/toolchain/toolchain.gni")
10 import("//build/toolchain/concurrent_links.gni") 10 import("//build/toolchain/concurrent_links.gni")
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 # These share a name with global variables that are already defined, and 262 # These share a name with global variables that are already defined, and
263 # forward_variables_from won't clobber the existing value, so we need to 263 # forward_variables_from won't clobber the existing value, so we need to
264 # set it explicitly. 264 # set it explicitly.
265 if (defined(invoker.is_clang)) { 265 if (defined(invoker.is_clang)) {
266 is_clang = invoker.is_clang 266 is_clang = invoker.is_clang
267 } 267 }
268 if (defined(invoker.is_component_build)) { 268 if (defined(invoker.is_component_build)) {
269 is_component_build = invoker.is_component_build 269 is_component_build = invoker.is_component_build
270 } 270 }
271 if (defined(invoker.is_asan)) {
272 is_asan = invoker.is_asan
273 }
271 274
272 # This value needs to be passed through unchanged. 275 # This value needs to be passed through unchanged.
273 host_toolchain = host_toolchain 276 host_toolchain = host_toolchain
274 } 277 }
275 } 278 }
276 } 279 }
277 280
278 if (is_clang) { 281 if (is_clang) {
279 sys_include_prefix = "-imsvc" 282 sys_include_prefix = "-imsvc"
280 } else { 283 } else {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 environment = "environment.x64" 348 environment = "environment.x64"
346 toolchain_cpu = "x64" 349 toolchain_cpu = "x64"
347 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" 350 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\""
348 is_clang = false 351 is_clang = false
349 352
350 # This shares a name with a global and forward_variables_from won't clobber 353 # This shares a name with a global and forward_variables_from won't clobber
351 # the existing value, so we need to set it explicitly. 354 # the existing value, so we need to set it explicitly.
352 if (defined(invoker.is_component_build)) { 355 if (defined(invoker.is_component_build)) {
353 is_component_build = invoker.is_component_build 356 is_component_build = invoker.is_component_build
354 } 357 }
358 if (defined(invoker.is_asan)) {
359 is_asan = invoker.is_asan
360 }
355 } 361 }
356 362
357 msvc_toolchain("clang_" + target_name) { 363 msvc_toolchain("clang_" + target_name) {
358 environment = "environment.x64" 364 environment = "environment.x64"
359 toolchain_cpu = "x64" 365 toolchain_cpu = "x64"
360 prefix = rebase_path("$clang_base_path/bin", root_build_dir) 366 prefix = rebase_path("$clang_base_path/bin", root_build_dir)
361 cl = "${goma_prefix}$prefix/${clang_cl}" 367 cl = "${goma_prefix}$prefix/${clang_cl}"
362 toolchain_os = "win" 368 toolchain_os = "win"
363 is_clang = true 369 is_clang = true
364 sys_include_flags = "${x64_toolchain_data.include_flags}" 370 sys_include_flags = "${x64_toolchain_data.include_flags}"
365 371
366 # This shares a name with a global and forward_variables_from won't clobber 372 # This shares a name with a global and forward_variables_from won't clobber
367 # the existing value, so we need to set it explicitly. 373 # the existing value, so we need to set it explicitly.
368 if (defined(invoker.is_component_build)) { 374 if (defined(invoker.is_component_build)) {
369 is_component_build = invoker.is_component_build 375 is_component_build = invoker.is_component_build
370 } 376 }
377 if (defined(invoker.is_asan)) {
378 is_asan = invoker.is_asan
379 }
371 } 380 }
372 } 381 }
373 382
374 win_x64_toolchains("x64") { 383 win_x64_toolchains("x64") {
375 # TODO(mcgrathr): These assignments are only required because of 384 # TODO(mcgrathr): These assignments are only required because of
376 # crbug.com/395883. Drop them if that ever gets fixed in GN. 385 # crbug.com/395883. Drop them if that ever gets fixed in GN.
377 concurrent_links = concurrent_links 386 concurrent_links = concurrent_links
378 goma_prefix = goma_prefix 387 goma_prefix = goma_prefix
379 x64_toolchain_data = x64_toolchain_data 388 x64_toolchain_data = x64_toolchain_data
389 if (target_cpu == "x86") {
390 is_asan = false
391 }
380 } 392 }
381 393
382 # The nacl_win64 toolchain is nearly identical to the plain x64 toolchain. 394 # The nacl_win64 toolchain is nearly identical to the plain x64 toolchain.
383 # It's used solely for building nacl64.exe (//components/nacl/broker:nacl64). 395 # It's used solely for building nacl64.exe (//components/nacl/broker:nacl64).
384 # The only reason it's a separate toolchain is so that it can force 396 # The only reason it's a separate toolchain is so that it can force
385 # is_component_build to false in the toolchain_args() block, because 397 # is_component_build to false in the toolchain_args() block, because
386 # building nacl64.exe in component style does not work. 398 # building nacl64.exe in component style does not work.
387 win_x64_toolchains("nacl_win64") { 399 win_x64_toolchains("nacl_win64") {
388 is_component_build = false 400 is_component_build = false
401 is_asan = false
389 402
390 # TODO(mcgrathr): These assignments are only required because of 403 # TODO(mcgrathr): These assignments are only required because of
391 # crbug.com/395883. Drop them if that ever gets fixed in GN. 404 # crbug.com/395883. Drop them if that ever gets fixed in GN.
392 concurrent_links = concurrent_links 405 concurrent_links = concurrent_links
393 goma_prefix = goma_prefix 406 goma_prefix = goma_prefix
394 x64_toolchain_data = x64_toolchain_data 407 x64_toolchain_data = x64_toolchain_data
395 clang_cl = clang_cl 408 clang_cl = clang_cl
396 } 409 }
397 410
398 # WinRT toolchains. Only define these when targeting them. 411 # WinRT toolchains. Only define these when targeting them.
(...skipping 14 matching lines...) Expand all
413 426
414 msvc_toolchain("winrt_x64") { 427 msvc_toolchain("winrt_x64") {
415 environment = "environment.winrt_x64" 428 environment = "environment.winrt_x64"
416 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 429 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
417 is_clang = false 430 is_clang = false
418 431
419 toolchain_cpu = "x64" 432 toolchain_cpu = "x64"
420 toolchain_os = current_os 433 toolchain_os = current_os
421 } 434 }
422 } 435 }
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