diff options
author | Charles-Fran?ois Natali <cf.natali@gmail.com> | 2014-05-08 23:08:51 +0100 |
---|---|---|
committer | Charles-Fran?ois Natali <cf.natali@gmail.com> | 2014-05-08 23:08:51 +0100 |
commit | dc91a772d955f6dd4af3ce0070d03159c4b6c3b2 (patch) | |
tree | 98544cc74219504178e8c94ac041221828e10247 /configure.ac | |
parent | 205d87db00012440bc6c5659e3b3a910cef644d5 (diff) | |
download | cpython-dc91a772d955f6dd4af3ce0070d03159c4b6c3b2.tar.gz |
Issue #21037: Add a build option to enable AddressSanitizer support.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b2f519f5fa..a6f613ae25 100644 --- a/configure.ac +++ b/configure.ac @@ -2314,6 +2314,17 @@ esac ], [AC_MSG_RESULT(default)]) +AC_MSG_CHECKING(for --with-address-sanitizer) +AC_ARG_WITH(address_sanitizer, + AS_HELP_STRING([--with-address-sanitizer], + [enable AddressSanitizer]), +[ +AC_MSG_RESULT($withval) +BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS" +LDFLAGS="-fsanitize=address $LDFLAGS" +], +[AC_MSG_RESULT(no)]) + # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets |