build: add config option to use Address Sanitizer
Change-Id: I98bf4ab1c58a90341c2a8529de4537fb0250f00d Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
bba5f43ce5
commit
4cb05719bd
3
CONFIG
3
CONFIG
@ -37,6 +37,9 @@ CONFIG_DEBUG?=n
|
||||
# Build with code coverage instrumentation.
|
||||
CONFIG_COVERAGE?=n
|
||||
|
||||
# Build with Address Sanitizer enabled
|
||||
CONFIG_ADDRESS_SANITIZER?=n
|
||||
|
||||
# This directory should contain 'include' and 'lib' directories for your DPDK
|
||||
# installation. Alternatively you can specify this on the command line
|
||||
# with 'make DPDK_DIR=/path/to/dpdk'.
|
||||
|
@ -92,6 +92,11 @@ endif
|
||||
|
||||
CFLAGS += $(COMMON_CFLAGS) -Wno-pointer-sign -std=gnu99
|
||||
|
||||
ifeq ($(CONFIG_ADDRESS_SANITIZER),y)
|
||||
COMMON_CFLAGS += -fsanitize=address
|
||||
LDFLAGS += -fsanitize=address
|
||||
endif
|
||||
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
||||
OBJS = $(C_SRCS:.c=.o)
|
||||
|
Loading…
Reference in New Issue
Block a user