Harald Welte has submitted this change and it was merged.

Change subject: Add --enable-sanitize configure option
......................................................................


Add --enable-sanitize configure option

Change-Id: Idb2c1d6057012ed2f032e7504387a0767d02d75b
---
M configure.ac
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/configure.ac b/configure.ac
index 3533af9..5867cbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,15 @@
 
 dnl Checks for typedefs, structures and compiler characteristics
 
+AC_ARG_ENABLE(sanitize,
+               [AS_HELP_STRING([--enable-sanitize], [Compile with address 
sanitizer enabled], )],
+               [sanitize=$enableval], [sanitize="no"])
+if test x"$sanitize" = x"yes"
+then
+       CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
+       CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
+fi
+
 dnl checks for libraries
 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore  >= 0.10.1)
 PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty)

-- 
To view, visit https://gerrit.osmocom.org/5544
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb2c1d6057012ed2f032e7504387a0767d02d75b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to