From 172c99c2346922137214dda6476ecb0c6f1a28d9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 28 Sep 2020 13:43:05 +0200 Subject: [PATCH] build: configure: enable asan in debug mode --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index e35ce60..fde83ce 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,12 @@ AC_PROG_CC_STDC # Warnings AX_COMPILER_FLAGS([], [], [], [-Wall -Wextra -pedantic]) +# Use Address-santizer in debug, if it is available +AS_IF( + [test "x$ax_enable_debug" = "xyes"], + [AX_APPEND_COMPILE_FLAGS([-fsanitize=address])] +) + # Use Flex/Lex AM_PROG_LEX # Use Bion/Yacc