aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'gn/BUILD.gn')
-rw-r--r--gn/BUILD.gn10
1 files changed, 9 insertions, 1 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index f75637a961..8b4f953763 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -212,9 +212,17 @@ config("default") {
# You can either pass the sanitizers directly, e.g. "address,undefined",
# or pass one of the couple common aliases used by the bots.
sanitizers = sanitize
+
+ # fyi_sanitizers only print out stacktraces of their issues
+ fyi_sanitizers = fyi_sanitize
if (sanitize == "ASAN" || sanitize == "UBSAN") {
# ASAN implicitly runs all UBSAN checks also.
sanitizers = "bool,float-cast-overflow,integer-divide-by-zero,nonnull-attribute,null,return,returns-nonnull-attribute,shift,signed-integer-overflow,unreachable,vla-bound"
+
+ if (fyi_sanitize == "" && !is_android) {
+ fyi_sanitizers = "float-divide-by-zero"
+ }
+
if (!is_mac && !is_win) {
sanitizers += ",function" # Not supported on Mac or Win.
}
@@ -245,7 +253,7 @@ config("default") {
}
cflags += [
- "-fsanitize=$sanitizers",
+ "-fsanitize=$sanitizers,$fyi_sanitizers",
"-fno-sanitize-recover=$sanitizers",
]
if (!is_win) {