]> jfr.im git - solanum.git/commitdiff
Merge pull request #308 from edk0/with-asan
authorAaron Jones <redacted>
Fri, 10 Jan 2020 15:36:06 +0000 (15:36 +0000)
committerGitHub <redacted>
Fri, 10 Jan 2020 15:36:06 +0000 (15:36 +0000)
Add --with-asan to build with asan

configure.ac

index 1281422cd884f9377b9dcc7c53ae8306c8fea4cc..e03c71575ab8fd5ab7adc4e5f913daf5040749bb 100644 (file)
@@ -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 -fsanitize=address"
+])
+
 # rpath, for finding librb.so at run time
 hold_ldflags=$LDFLAGS
 AC_MSG_CHECKING(for the ld -rpath flag)