diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-03-09 16:20:12 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-03-11 14:14:51 +0700 |
commit | cbf818d4dcba53b226df8d36966482dc8b6d6ef4 (patch) | |
tree | 523c01f24c25397cbc403edebc64aea3bbfc4b7b | |
parent | 7fd8ef2d3f3d296a6032745396d3af8e8e3d4da2 (diff) |
trxcon/configure.ac: add --enable-sanitize option
Change-Id: I099de726f9d67213c56d996039b4207f80a727c6
-rw-r--r-- | src/host/trxcon/configure.ac | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/host/trxcon/configure.ac b/src/host/trxcon/configure.ac index a94859b7..1f24260d 100644 --- a/src/host/trxcon/configure.ac +++ b/src/host/trxcon/configure.ac @@ -18,6 +18,17 @@ PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm) dnl checks for header files AC_HEADER_STDC +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 typedefs, structures and compiler characteristics AC_OUTPUT( |