bootstrap: Add 'dev' parameter to run ./configure with additional CFLAGS
Also, add -DDEBUG as CODE_COVERAGE_CPPFLAGS has -DNDEBUG, and we set
the coverage flags globally. Maybe that's not a good idea, but we
definitely want to trigger asserts in the test cases.
Change-Id: Ied39252678f1b28284024cd4435996416bd3eb22
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I9255e7300b783e536a687af6d7efdb54d41a86b1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/bootstrap.sh b/bootstrap.sh
index f1be536..9daba3b 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -16,4 +16,15 @@
esac
autoreconf -i
-echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'
+
+case $1 in
+ dev)
+ ./configure \
+ CPPFLAGS="-UNDEBUG" \
+ CFLAGS="-fsanitize=address -fsanitize=leak -fsanitize=undefined -Wall -Werror" \
+ --enable-code-coverage
+ ;;
+ *)
+ echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'
+ ;;
+esac