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

Unified Diff: build/config/sanitizers/sanitizers.gni

Issue 1386713002: Make GN use_custom_libcxx work properly with sanitizers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 5 years, 2 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 | tools/gn/functions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/sanitizers/sanitizers.gni
diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni
index 84348da425ae90a53e5f74edbf7709f51fd1cd50..fb9703e9330c47c4273769690e7401b32c2a0e1b 100644
--- a/build/config/sanitizers/sanitizers.gni
+++ b/build/config/sanitizers/sanitizers.gni
@@ -19,11 +19,6 @@ declare_args() {
# undefined behaviour.
is_ubsan = false
- # Use libc++ (buildtools/third_party/libc++ and
- # buildtools/third_party/libc++abi) instead of stdlibc++ as standard library.
- # This is intended to be used for instrumented builds.
- use_custom_libcxx = (is_asan && is_linux) || is_tsan || is_msan || is_ubsan
-
# Track where uninitialized memory originates from. From fastest to slowest:
# 0 - no tracking, 1 - track only the initial allocation site, 2 - track the
# chain of stores leading from allocation site to use site.
@@ -48,6 +43,16 @@ declare_args() {
use_cfi_diag = false
}
+# Args that are in turn dependent on other args must be in a separate
+# declare_args block. User overrides are only applied at the end of a
+# declare_args block.
+declare_args() {
+ # Use libc++ (buildtools/third_party/libc++ and
+ # buildtools/third_party/libc++abi) instead of stdlibc++ as standard library.
+ # This is intended to be used for instrumented builds.
+ use_custom_libcxx = (is_asan && is_linux) || is_tsan || is_msan || is_ubsan
+}
+
# TODO(GYP) bug 527515: is_ubsan, is_ubsan_vptr
using_sanitizer = is_asan || is_lsan || is_tsan || is_msan || is_ubsan
« no previous file with comments | « no previous file | tools/gn/functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698