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

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

Issue 2192833002: Fix GN generation for WinASAN build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 dff6eb3c96612b2e294ac63f0abca1fe961e6ebc..ebf9b27fb8543550da29f91c6bbea009a144aefe 100644
--- a/build/config/sanitizers/BUILD.gn
+++ b/build/config/sanitizers/BUILD.gn
@@ -227,16 +227,30 @@ config("asan_flags") {
}
if (is_win) {
- assert(current_cpu == "x86", "WinASan is 32-bit only currently")
- if (is_component_build) {
- libs = [
- "clang_rt.asan_dynamic-i386.lib",
- "clang_rt.asan_dynamic_runtime_thunk-i386.lib",
- ]
+ if (current_cpu == "x64") {
+ # Windows 64-bit.
+ if (is_component_build) {
+ libs = [
+ "clang_rt.asan_dynamic-x86_64.lib",
+ "clang_rt.asan_dynamic_runtime_thunk-x86_64.lib",
+ ]
+ } else {
+ # TODO(rnk): DLLs in the non-component build should link against
chrisha 2016/07/28 15:29:57 TODO(etienneb), given that you're now driving this
etienneb 2016/07/28 16:27:59 Done.
+ # clang_rt.asan_dll_thunk-x86_64.lib instead.
+ libs = [ "clang_rt.asan-x86_64.lib" ]
+ }
} else {
- # TODO(rnk): DLLs in the non-component build should link against
- # clang_rt.asan_dll_thunk-i386.lib instead.
- libs = [ "clang_rt.asan-i386.lib" ]
+ 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(rnk): DLLs in the non-component build should link against
+ # clang_rt.asan_dll_thunk-i386.lib instead.
+ libs = [ "clang_rt.asan-i386.lib" ]
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698