aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/BUILD.gn
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2018-03-20 10:10:58 -0400
committerGravatar Kevin Lubick <kjlubick@google.com>2018-03-20 14:36:36 +0000
commitd095040ae9bba871d3025fa106edabb0840193b4 (patch)
treef4e6a6b5e92a6b94490b76b169d6e28191380a52 /gn/BUILD.gn
parent7b065e124c8b8fe83aa68fe4ee9ddb28820feffb (diff)
Add in float-divide-by-zero as an FYI sanitizer
Bug: skia: Change-Id: Iacf9bcf10c69d3d6e2a1a2bdcce62bdd364582a1 Reviewed-on: https://skia-review.googlesource.com/115078 Reviewed-by: Mike Klein <mtklein@chromium.org>
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) {