Add option to build with address-sanitizer
This commit is contained in:
parent
295351792e
commit
42f3fad2c3
10
configure.ac
10
configure.ac
@ -51,6 +51,16 @@ m4_ifdef([PKG_CHECK_MODULES], [], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl Add option to build with using address sanitizer
|
||||
AC_ARG_ENABLE([address-sanitizer], AS_HELP_STRING([--enable-address-sanitizer], \
|
||||
[enabled AddressSanitizer support for detecting a wide variety of \
|
||||
memory allocation and deallocation errors]), \
|
||||
[AC_DEFINE(HAVE_ADDRESS_SANITIZER, 1, [enable AddressSanitizer])
|
||||
CFLAGS="$CFLAGS -fsanitize=address"
|
||||
AC_TRY_COMPILE([],[const int i=0;],[AC_MSG_NOTICE([Address Sanitizer Enabled])],
|
||||
[AC_MSG_ERROR([Address Sanitizer not available])])
|
||||
])
|
||||
|
||||
#
|
||||
# OpenSSL detection borrowed from stunnel
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user