diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2020-02-27 23:46:40 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2020-02-27 23:46:40 +0700 |
commit | 2d355c2453a727ccb631b95d0d8dd7f88414cc73 (patch) | |
tree | 308373a0df9333a8a156cae4101e57bc17f3c9ba | |
parent | 938faa16e415e240fd07354f8498787da4934e6c (diff) |
virt_phy/build: add configure option to build with ASan/USBan
Change-Id: I23fc4e38632c02269b3895115ba4e3171cc212d1
-rw-r--r-- | src/host/virt_phy/configure.ac | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/host/virt_phy/configure.ac b/src/host/virt_phy/configure.ac index c8012c99..a2c2bf65 100644 --- a/src/host/virt_phy/configure.ac +++ b/src/host/virt_phy/configure.ac @@ -20,6 +20,17 @@ AC_HEADER_STDC 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 + AC_CONFIG_FILES([ Makefile include/Makefile |