]> granicus.if.org Git - libvpx/commitdiff
tool/set_analyzer_env: disable implicit-integer-truncation
authorJames Zern <jzern@google.com>
Mon, 1 Apr 2019 19:03:22 +0000 (12:03 -0700)
committerJames Zern <jzern@google.com>
Mon, 1 Apr 2019 19:40:53 +0000 (12:40 -0700)
with clang-7 this causes additional warnings in x86 intrinsics and
elsewhere. disabling for now to unblock new changes.

BUG=webm:1615

Change-Id: Ide9cacee5547ed432f980f6804e1414f32639121

tools/set_analyzer_env.sh

index 8ee0c4fe5aa6d0f37c69f63cc894225413da74e1..4bdbba6523ced687b5f309d22117804ef88bfddb 100644 (file)
@@ -82,6 +82,17 @@ if [ "${sanitizer}" = "cfi" ]; then
   export AR="llvm-ar"
 fi
 
+# TODO(http://crbug.com/webm/1615): -fsanitize=implicit-integer-truncation
+# causes conversion warnings in many of the x86 intrinsics and elsewhere.
+if [ "${sanitizer}" = "integer" ]; then
+  major_version=$(clang --version | head -n 1 \
+    | grep -o -E "[[:digit:]]\.[[:digit:]]\.[[:digit:]]" | cut -f1 -d.)
+  if [ ${major_version} -ge 7 ]; then
+    cflags="${cflags} -fno-sanitize=implicit-integer-truncation"
+    ldflags="${ldflags} -fno-sanitize=implicit-integer-truncation"
+  fi
+fi
+
 set -x
 export CC="clang"
 export CXX="clang++"