Commit 4cb05719 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

build: add config option to use Address Sanitizer



Change-Id: I98bf4ab1c58a90341c2a8529de4537fb0250f00d
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent bba5f43c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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'.
+5 −0
Original line number Diff line number Diff line
@@ -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)