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

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

Issue 2215693003: gn: Make mini_installer link in static asan builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better better rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/mini_installer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/sanitizers/BUILD.gn
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
index 1b16a8e4b422e75a6972fde6128160040cd9347a..359453b9312c119e82cf6051c46e9daba2fdfd21 100644
--- a/build/config/sanitizers/BUILD.gn
+++ b/build/config/sanitizers/BUILD.gn
@@ -191,6 +191,30 @@ config("default_sanitizer_ldflags") {
]
}
}
+ } else if (is_win && is_asan) {
+ # Windows directly calls link.exe instead of the compiler driver when
+ # linking. Hence, pass the runtime libraries instead of -fsanitize=address.
+ # In the static-library build, libraries are different for executables
+ # and dlls, see link_executable and link_shared_library below.
+ # This here handles only the component build.
+ if (target_cpu == "x64") {
+ # Windows 64-bit. TODO(etienneb): Remove the assert when this is ready.
+ if (is_component_build) {
+ assert(false, "win/asan does not work in 64-bit yet")
+ libs = [
+ "clang_rt.asan_dynamic-x86_64.lib",
+ "clang_rt.asan_dynamic_runtime_thunk-x86_64.lib",
+ ]
+ }
+ } else {
+ assert(target_cpu == "x86", "WinASan unsupported architecture")
+ if (is_component_build) {
+ libs = [
+ "clang_rt.asan_dynamic-i386.lib",
+ "clang_rt.asan_dynamic_runtime_thunk-i386.lib",
+ ]
+ }
+ }
}
}
@@ -246,30 +270,6 @@ config("asan_flags") {
[ "-fsanitize-blacklist=" +
rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir) ]
}
-
- if (is_win) {
- # In the static-library build, libraries are different for executables
- # and dlls, see link_executable and link_shared_library below.
- # This here handles only the component build.
- if (target_cpu == "x64") {
- # Windows 64-bit. TODO(etienneb): Remove the assert when this is ready.
- if (is_component_build) {
- assert(false, "win/asan does not work in 64-bit yet")
- libs = [
- "clang_rt.asan_dynamic-x86_64.lib",
- "clang_rt.asan_dynamic_runtime_thunk-x86_64.lib",
- ]
- }
- } else {
- assert(target_cpu == "x86", "WinASan unsupported architecture")
- if (is_component_build) {
- libs = [
- "clang_rt.asan_dynamic-i386.lib",
- "clang_rt.asan_dynamic_runtime_thunk-i386.lib",
- ]
- }
- }
- }
}
}
« no previous file with comments | « no previous file | chrome/installer/mini_installer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698