Harald Welte has submitted this change and it was merged.

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


Add --enable-sanitize configure option

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

Approvals:
  tnt: Looks good to me, but someone else must approve
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved; Verified



diff --git a/configure.ac b/configure.ac
index 180e380..018c479 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,15 @@
 # Checks for programs.
 AC_PROG_CC
 
+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
+
 # Checks for libraries.
  # libosmocore (codec module)
 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.2)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb26e5fc73843f3951dbc534653ee7d88e4c80e7
Gerrit-PatchSet: 1
Gerrit-Project: gapk
Gerrit-Branch: master
Gerrit-Owner: Max <msur...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Vadim Yanitskiy <axilira...@gmail.com>
Gerrit-Reviewer: fixeria <axilira...@gmail.com>
Gerrit-Reviewer: tnt <t...@246tnt.com>

Reply via email to