trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] branch master updated: TS-3939: Add a --enable-asan configure option
Date Fri, 28 Oct 2016 23:25:59 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  73cb79c   TS-3939: Add a --enable-asan configure option
73cb79c is described below

commit 73cb79c7389339efa467d5c2278fc22f1d0f25f0
Author: Bryan Call <bcall@apache.org>
AuthorDate: Fri Oct 28 16:01:49 2016 -0700

    TS-3939: Add a --enable-asan configure option
---
 configure.ac | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index df7925b..eed69ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -188,6 +188,14 @@ AC_ARG_ENABLE([werror],
 )
 AC_MSG_RESULT([$enable_werror])
 
+# Enable ASAN for the builds
+AC_MSG_CHECKING([whether to enable asan])
+AC_ARG_ENABLE([asan],
+  [AS_HELP_STRING([--enable-asan],[turn on asan])],
+  [],
+  [enable_asan=no]
+)
+AC_MSG_RESULT([$enable_asan])
 
 #
 # Fast SDK APIs, this disables the parameter checks (assert)
@@ -903,6 +911,12 @@ else
   TS_ADDTO(CXXFLAGS, [${cxx_oflag_opt}])
 fi
 
+# Flags for ASAN
+if test "x${enable_asan}" = "xyes"; then
+  TS_ADDTO(CFLAGS, [-fno-omit-frame-pointer -fsanitize=address])
+  TS_ADDTO(CXXFLAGS, [-fno-omit-frame-pointer -fsanitize=address])
+fi
+
 # Checks for pointer size.
 # TODO: Later this is irrelevant, and we should just bail on 32-bit platforms always
 AC_CHECK_SIZEOF([void*])

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message