Add the --with-llvm-sanitizer flag
To enable the leaks detector, set the ASAN_OPTIONS=detect_leaks=1 environment variable, e.g: ASAN_OPTIONS=detect_leaks=1 example/ndpiReader -i test.pcap
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user