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

Unified Diff: build/config/sanitizers/BUILD.gn

Issue 2198333002: Make Win Clang ASan builds work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify win toolchain change a bit Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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" ]
Nico 2016/08/02 14:20:51 Why is this needed here at all now that the other
Dirk Pranke 2016/08/02 17:19:03 Yes, I think you're right.
}
} 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" ]
}
}
}
« build/config/BUILD.gn ('K') | « build/config/BUILD.gn ('k') | build/toolchain/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698