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

Unified Diff: build/config/compiler/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: 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
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 0e28e7da8be6dce3e5b5d93500416c894b8513cd..2ef116ce87df01b155b99fe7cb240cd45b31bcd3 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -139,12 +139,36 @@ config("compiler") {
]
}
if (is_asan) {
- cflags += [ "-fsanitize=address" ]
+ asan_blacklist_path = rebase_path(asan_blacklist, root_build_dir)
+ cflags += [
+ "-fsanitize=address",
+ "-fsanitize-blacklist=$asan_blacklist_path",
+ ]
if (is_mac) {
cflags += [ "-mllvm -asan-globals=0" ] # http://crbug.com/352073
# TODO(GYP): deal with mac_bundles.
}
}
+ if (is_lsan) {
+ cflags += [ "-fsanitize=leak" ]
+ }
+ if (is_tsan) {
+ tsan_blacklist_path = rebase_path(tsan_blacklist, root_build_dir)
+ cflags += [
+ "-fsanitize=thread",
+ "-fsanitize-blacklist=$tsan_blacklist_path",
+ ]
+ }
+ if (is_msan) {
+ msan_blacklist_path = rebase_path(msan_blacklist, root_build_dir)
+ cflags += [
+ "-fsanitize=memory",
+ "-fsanitize-memory-track-origins=$msan_track_origins",
+ "-fsanitize-blacklist=$msan_blacklist_path",
+ ]
+
+ # TODO(GYP): Support instrumented libraries and custom libc++.
+ }
}
if (is_clang && is_debug) {

Powered by Google App Engine
This is Rietveld 408576698