Add a configure flag for ASAN.

This commit is contained in:
Nicholas Marriott
2026-05-06 08:23:26 +01:00
parent ad94405dac
commit 2aad2cfc53
2 changed files with 13 additions and 0 deletions

View File

@@ -41,6 +41,10 @@ endif
AM_CPPFLAGS += -DDEBUG
endif
AM_CPPFLAGS += -iquote.
if IS_ASAN
AM_CFLAGS += -fsanitize=address
AM_LDFLAGS += -fsanitize=address
endif
endif
# Set flags for Solaris.

View File

@@ -73,6 +73,15 @@ AC_ARG_ENABLE(
)
AM_CONDITIONAL(IS_OPTIMIZED, test "x$enable_optimizations" = xyes)
# Is this --enable-asan?
AC_ARG_ENABLE(
asan,
AS_HELP_STRING(--enable-asan, enable ASAN build flags),
,
enable_asan=no
)
AM_CONDITIONAL(IS_ASAN, test "x$enable_asan" = xyes)
# Is this a static build?
AC_ARG_ENABLE(
static,