diff options
author | Mike Klein <mtklein@chromium.org> | 2017-10-05 11:22:09 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-05 15:58:34 +0000 |
commit | 46d6c683c15bf194cc75364294230b926a083513 (patch) | |
tree | 60b6e0c8bfe54059f4b6c9869cfe5c8a97379301 | |
parent | 8d64ee7795991ceaa2346a63bd9660e4722f346e (diff) |
disable object-size santizer in debug builds
This avoids a warning-as-error:
clang-5.0: error: the object size sanitizer has no effect at -O0, but
is explicitly enabled:
Change-Id: I53a16acc3e743b42fe9c2f35919d3c09d5d601b7
Reviewed-on: https://skia-review.googlesource.com/55720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
-rw-r--r-- | gn/BUILD.gn | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn index 1a61c28461..dd2884997d 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -236,9 +236,12 @@ config("default") { # or pass one of the couple common aliases used by the bots. sanitizers = sanitize if (sanitize == "ASAN") { - sanitizers = "address,bool,integer-divide-by-zero,nonnull-attribute,null,object-size,return,returns-nonnull-attribute,shift,signed-integer-overflow,unreachable,vla-bound,vptr" + sanitizers = "address,bool,integer-divide-by-zero,nonnull-attribute,null,return,returns-nonnull-attribute,shift,signed-integer-overflow,unreachable,vla-bound,vptr" if (!is_mac) { - sanitizers += ",function" + sanitizers += ",function" # Not supported on Mac. + } + if (!is_debug) { + sanitizers += ",object-size" # No-op with somewhat annoying warning at -O0. } } else if (sanitize == "TSAN") { sanitizers = "thread" |