From 361d3471e8ee2799213178b854b3b13935b89be9 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Feb 2021 11:23:50 +0100 Subject: [PATCH] Add configure option to enable AddressSanitizer --- configure.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.in b/configure.in index 2614cab3..7d5c89a3 100644 --- a/configure.in +++ b/configure.in @@ -162,6 +162,12 @@ if test "x$with_assertions" != "xyes"; then CFLAGS="$CFLAGS -DNDEBUG" fi +AC_ARG_WITH(asan, [ --with-asan Enable AddressSanitizer. Requires compiler support.]) +if test "x$with_asan" = "xyes"; then + CFLAGS="$CFLAGS -fsanitize=address" + LDFLAGS="$LDFLAGS -fsanitize=address" +fi + dnl ================================================================= dnl Check for user and group validity dnl ================================================================= -- 2.39.2