summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-05-02 15:55:21 -0700
committerBen Smith <binji@chromium.org>2016-05-02 15:55:21 -0700
commitf763ea9eafcef0465289bec046374728111f8b05 (patch)
tree3b75e9ecfcebeea83a87e417db33d3920c95131e /Makefile
parent9e03d853eca4653e6d45a5979105fed647fd2910 (diff)
downloadwabt-f763ea9eafcef0465289bec046374728111f8b05.tar.gz
wabt-f763ea9eafcef0465289bec046374728111f8b05.tar.bz2
wabt-f763ea9eafcef0465289bec046374728111f8b05.zip
ubsan should trap on error
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f21c5756..93549d42 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,8 @@ SANITIZERS := ASAN MSAN LSAN UBSAN
CONFIGS := NORMAL $(SANITIZERS) NO_RE2C_BISON NO_TESTS
EXECUTABLES := sexpr-wasm wasm-wast wasm-interp wasm-interp-sq hexfloat_test
+UBSAN_C_FLAGS := -fsanitize=undefined -fno-sanitize-recover
+
# directory names
GCC_DIR := gcc/
GCC_I686_DIR := gcc-i686/
@@ -63,7 +65,7 @@ NORMAL_FLAG :=
ASAN_FLAG := -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address
MSAN_FLAG := -DCMAKE_C_FLAGS=-fsanitize=memory -DCMAKE_CXX_FLAGS=-fsanitize=memory
LSAN_FLAG := -DCMAKE_C_FLAGS=-fsanitize=leak -DCMAKE_CXX_FLAGS=-fsanitize=leak
-UBSAN_FLAG := -DCMAKE_C_FLAGS=-fsanitize=undefined -DCMAKE_CXX_FLAGS=-fsanitize=undefined
+UBSAN_FLAG := -DCMAKE_C_FLAGS="${UBSAN_C_FLAGS}" -DCMAKE_CXX_FLAGS="${UBSAN_C_FLAGS}"
NO_RE2C_BISON_FLAG := -DRUN_BISON=OFF -DRUN_RE2C=OFF
NO_TESTS_FLAG := -DBUILD_TESTS=OFF