From 46d6c683c15bf194cc75364294230b926a083513 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Thu, 5 Oct 2017 11:22:09 -0400 Subject: 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 Commit-Queue: Mike Klein --- gn/BUILD.gn | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gn/BUILD.gn') 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" -- cgit v1.2.3