| Index: build/config/sanitizers/BUILD.gn
|
| diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
|
| index 1330a1f8aa3f2d66191b8d3e638eabedfa2197a8..0addc31c89364e1898c5187e86659a7e45c43025 100644
|
| --- a/build/config/sanitizers/BUILD.gn
|
| +++ b/build/config/sanitizers/BUILD.gn
|
| @@ -134,6 +134,16 @@ static_library("options_sources") {
|
| }
|
| }
|
|
|
| +config("executable_config") {
|
| + if (is_win && is_asan) {
|
| + if (current_cpu == "x64") {
|
| + libs = [ "clang_rt.asan_dynamic-x86_64.lib" ]
|
| + } else {
|
| + libs = [ "clang_rt.asan_dynamic-i386.lib" ]
|
| + }
|
| + }
|
| +}
|
| +
|
| # Applies linker flags necessary when either :deps or :default_sanitizer_flags
|
| # are used.
|
| config("default_sanitizer_ldflags") {
|
| @@ -238,7 +248,7 @@ config("asan_flags") {
|
| }
|
|
|
| if (is_win) {
|
| - if (target_cpu == "x64") {
|
| + if (current_cpu == "x64") {
|
| # Windows 64-bit.
|
| if (is_component_build) {
|
| libs = [
|
| @@ -246,21 +256,17 @@ config("asan_flags") {
|
| "clang_rt.asan_dynamic_runtime_thunk-x86_64.lib",
|
| ]
|
| } else {
|
| - # TODO(etienneb): DLLs in the non-component build should link against
|
| - # clang_rt.asan_dll_thunk-x86_64.lib instead.
|
| - libs = [ "clang_rt.asan-x86_64.lib" ]
|
| + libs = [ "clang_rt.asan_dynamic_runtime_thunk-x86_64.lib" ]
|
| }
|
| } else {
|
| - assert(target_cpu == "x86", "WinASan unsupported architecture")
|
| + assert(current_cpu == "x86", "WinASan unsupported architecture")
|
| if (is_component_build) {
|
| libs = [
|
| "clang_rt.asan_dynamic-i386.lib",
|
| "clang_rt.asan_dynamic_runtime_thunk-i386.lib",
|
| ]
|
| } else {
|
| - # TODO(etienneb): DLLs in the non-component build should link against
|
| - # clang_rt.asan_dll_thunk-i386.lib instead.
|
| - libs = [ "clang_rt.asan-i386.lib" ]
|
| + libs = [ "clang_rt.asan_dynamic_runtime_thunk-i386.lib" ]
|
| }
|
| }
|
| }
|
|
|