aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.seed9
-rw-r--r--src/lib/Makefile.in2
2 files changed, 10 insertions, 1 deletions
diff --git a/configure.seed b/configure.seed
index 092b9c022..23ef8490b 100644
--- a/configure.seed
+++ b/configure.seed
@@ -4,6 +4,15 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects])
+AC_ARG_WITH(llvm_sanitizer, [ --with-llvm-sanitizer Build with support for the LLVM address sanitizer])
+
+AS_IF([test "${with_llvm_sanitizer+set}" = set],[
+ CFLAGS="${CFLAGS} -Wno-unused-value -fsanitize=address -fno-omit-frame-pointer"
+ LDFLAGS="${LDFLAGS} -fsanitize=address"
+ CC=clang
+ CXX=clang++
+])
+
LT_INIT
AC_PROG_CC
diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
index 6be9d78e9..f69c81946 100644
--- a/src/lib/Makefile.in
+++ b/src/lib/Makefile.in
@@ -14,7 +14,7 @@ prefix = @prefix@
libdir = ${prefix}/lib
includedir = ${prefix}/include/ndpi
CC = @CC@
-CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 -g -Wall @CUSTOM_NDPI@
+CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -Wall @CFLAGS@ @CUSTOM_NDPI@
LDFLAGS = @LDFLAGS@
RANLIB = ranlib