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

Unified Diff: build/config/BUILD.gn

Issue 1134003008: GN: Implement is_lsan, is_tsan and is_msan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILD.gn
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 26bcd7d9fffff7fa6752cc3054ff9206010e4d85..eea52524483be4eed4d72356212f767c9d6f6c41 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -136,13 +136,31 @@ config("feature_flags") {
if (use_allocator != "tcmalloc") {
defines += [ "NO_TCMALLOC" ]
}
- if (is_asan) {
+ if (is_asan || is_lsan || is_tsan || is_msan) {
defines += [
- "ADDRESS_SANITIZER",
"MEMORY_TOOL_REPLACES_ALLOCATOR",
"MEMORY_SANITIZER_INITIAL_SIZE",
]
}
+ if (is_asan) {
+ defines += [ "ADDRESS_SANITIZER" ]
+ }
+ if (is_lsan) {
+ defines += [
+ "LEAK_SANITIZER",
+ "WTF_USE_LEAK_SANITIZER=1",
+ ]
+ }
+ if (is_tsan) {
+ defines += [
+ "THREAD_SANITIZER",
+ "DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1",
+ "WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1",
+ ]
+ }
+ if (is_msan) {
+ defines += [ "MEMORY_SANITIZER" ]
+ }
if (enable_webrtc) {
defines += [ "ENABLE_WEBRTC=1" ]
}
@@ -287,7 +305,12 @@ config("release") {
# Sanitizers.
# TODO(GYP) The GYP build has "release_valgrind_build == 0" for this
# condition. When Valgrind is set up, we need to do the same here.
- if (!is_tsan) {
+ if (is_tsan) {
+ defines += [
+ "DYNAMIC_ANNOTATIONS_ENABLED=1",
+ "WTF_USE_DYNAMIC_ANNOTATIONS=1",
+ ]
+ } else {
defines += [ "NVALGRIND" ]
if (!is_nacl) {
# NaCl always enables dynamic annotations. Currently this value is set to
« no previous file with comments | « no previous file | build/config/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698