From b97cc9a8299ad84bf75093dc390e36eb6ff77761 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 23 Nov 2017 14:59:05 +0100 Subject: build-sys: add --enable-asan and --memcheck-asan for tests The command ./configure --enable-asan adds -fsanitize=address to the compiler command line. In the regression tests leaks detection is disabled by default. You have to use --memcheck-asan on test command line to enable. Signed-off-by: Karel Zak --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index eebe92259..28fd7760c 100644 --- a/configure.ac +++ b/configure.ac @@ -141,6 +141,17 @@ AC_SUBST([BSD_WARN_CFLAGS]) UL_WARN_ADD([-Wno-unused-parameter], [NO_UNUSED_WARN_CFLAGS]) AC_SUBST([NO_UNUSED_WARN_CFLAGS]) + +AC_ARG_ENABLE([asan], + AS_HELP_STRING([--enable-asan], [compile with Address Sanitizer]), + [], [enable_asan=no] +) +AS_IF([test "x$enable_asan" == xyes], [ + UL_WARN_ADD([-fsanitize=address]) +]) + + + dnl libtool-2 LT_INIT -- cgit v1.2.3-55-g7522