summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2014-07-11 21:24:50 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2014-07-12 10:31:30 +0200
commitcc894a72098322e12700e543297dc333b11951de (patch)
treeb024fec5133fb604534928aef597d78705b81304 /configure.in
parent9a1419a7d4325085dc2235a8531d77e1d96ea689 (diff)
downloaderlang-cc894a72098322e12700e543297dc333b11951de.tar.gz
Implement --enable-sanitizers[=sanitizers]
Similar to debugging with Valgrind, it's very useful to enable -fsanitize= switches to catch bugs at runtime. $ ./configure Result: no sanitizer enabled $ ./configure --enable-sanitizers Result: -fsanitize=address,undefined $ ./configure --enable-sanitizers=address,thread,undefined Result: -fsanitize=address,thread,undefined $ ./configure --enable-sanitizers=undefined Result: -fsanitize=undefined
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index be906dcb4e..780e660f9d 100644
--- a/configure.in
+++ b/configure.in
@@ -366,6 +366,12 @@ elif test X"$TMPSYS" '=' X"Darwin-i386"; then
export LDFLAGS
fi
+m4_define(DEFAULT_SANITIZERS, [address,undefined])
+AC_ARG_ENABLE(sanitizers,
+ AS_HELP_STRING(
+ [--enable-sanitizers@<:@=comma-separated list of sanitizers@:>@],
+ [Default=DEFAULT_SANITIZERS]))
+
AC_ARG_ENABLE([silent-rules], [dnl
AS_HELP_STRING(
[--enable-silent-rules],