From 6d174635542795fdfe4cbb456bfd967333474c8d Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Mon, 6 Jan 2020 23:46:44 +0000 Subject: [PATCH] Add --with-asan to build with asan --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 1281422c..877cfb43 100644 --- a/configure.ac +++ b/configure.ac @@ -617,6 +617,14 @@ AC_HELP_STRING([--with-topiclen=NUMBER],[Set the max topic length to NUMBER (def AC_DEFINE_UNQUOTED(TOPICLEN, ${TOPICLEN}, [Maximum topic length (<=390)]) AC_DEFINE_UNQUOTED(NICKLEN, (${NICKLEN}+1), [Nickname length]) + +AC_ARG_WITH(asan, +AC_HELP_STRING([--with-asan],[Build with Address Sanitizer]), +[ + CFLAGS="$CFLAGS -fsanitize=address" + LDFLAGS="$LDFLAGS -lasan" +]) + # rpath, for finding librb.so at run time hold_ldflags=$LDFLAGS AC_MSG_CHECKING(for the ld -rpath flag)