diff options
author | Karel Zak | 2017-11-23 14:59:05 +0100 |
---|---|---|
committer | Karel Zak | 2017-11-23 14:59:05 +0100 |
commit | b97cc9a8299ad84bf75093dc390e36eb6ff77761 (patch) | |
tree | a8300730960d2378efadd3b867e73dd174d45e17 /configure.ac | |
parent | tests: rename --memcheck to --memcheck-valgrind (diff) | |
download | kernel-qcow2-util-linux-b97cc9a8299ad84bf75093dc390e36eb6ff77761.tar.gz kernel-qcow2-util-linux-b97cc9a8299ad84bf75093dc390e36eb6ff77761.tar.xz kernel-qcow2-util-linux-b97cc9a8299ad84bf75093dc390e36eb6ff77761.zip |
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 <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 11 insertions, 0 deletions
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 |