OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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_overrides/build.gni") | 5 import("//build_overrides/build.gni") |
6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 import("//build/config/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
8 import("//build/config/clang/clang.gni") | 8 import("//build/config/clang/clang.gni") |
9 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 } | 337 } |
338 } | 338 } |
339 } | 339 } |
340 | 340 |
341 config("link_executable") { | 341 config("link_executable") { |
342 if (is_asan && is_win && !is_component_build) { | 342 if (is_asan && is_win && !is_component_build) { |
343 if (target_cpu == "x64") { | 343 if (target_cpu == "x64") { |
344 # Windows 64-bit. TODO(etienneb): Remove the assert when this is ready. | 344 # Windows 64-bit. TODO(etienneb): Remove the assert when this is ready. |
345 assert(false, "win/asan does not work in 64-bit yet") | 345 assert(false, "win/asan does not work in 64-bit yet") |
346 libs = [ "clang_rt.asan-x86_64.lib" ] | 346 libs = [ "clang_rt.asan-x86_64.lib" ] |
| 347 ldflags = [ "-wholearchive:clang_rt.asan-x86_64.lib" ] |
347 } else { | 348 } else { |
348 assert(target_cpu == "x86", "WinASan unsupported architecture") | 349 assert(target_cpu == "x86", "WinASan unsupported architecture") |
349 libs = [ "clang_rt.asan-i386.lib" ] | 350 libs = [ "clang_rt.asan-i386.lib" ] |
| 351 ldflags = [ "-wholearchive:clang_rt.asan-i386.lib" ] |
350 } | 352 } |
351 } | 353 } |
352 } | 354 } |
353 | 355 |
354 config("link_shared_library") { | 356 config("link_shared_library") { |
355 if (is_asan && is_win && !is_component_build) { | 357 if (is_asan && is_win && !is_component_build) { |
356 if (target_cpu == "x64") { | 358 if (target_cpu == "x64") { |
357 # Windows 64-bit. TODO(etienneb): Remove the assert when this is ready. | 359 # Windows 64-bit. TODO(etienneb): Remove the assert when this is ready. |
358 assert(false, "win/asan does not work in 64-bit yet") | 360 assert(false, "win/asan does not work in 64-bit yet") |
359 libs = [ "clang_rt.asan_dll_thunk-x86_64.lib" ] | 361 libs = [ "clang_rt.asan_dll_thunk-x86_64.lib" ] |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 568 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
567 # if some third_party code is required to be compiled without rtti, which | 569 # if some third_party code is required to be compiled without rtti, which |
568 # is a requirement for ubsan_vptr. | 570 # is a requirement for ubsan_vptr. |
569 config("default_sanitizer_flags_but_ubsan_vptr") { | 571 config("default_sanitizer_flags_but_ubsan_vptr") { |
570 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 572 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
571 } | 573 } |
572 | 574 |
573 config("default_sanitizer_flags_but_coverage") { | 575 config("default_sanitizer_flags_but_coverage") { |
574 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 576 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
575 } | 577 } |
OLD | NEW |