Commit 1b68a8e7 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

config: add option to turn on UBSan



Change-Id: Ifb6b86db530d78bffdc28112f5fe1bdfcba6249c
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 6b1e22bd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@ CONFIG_COVERAGE?=n
# Build with Address Sanitizer enabled
CONFIG_ASAN?=n

# Build with Undefined Behavior Sanitizer enabled
CONFIG_UBSAN?=n

# Directory that contains the desired SPDK environment library.
# By default, this is implemented using DPDK.
CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env_dpdk
+5 −0
Original line number Diff line number Diff line
@@ -100,6 +100,11 @@ COMMON_CFLAGS += -fsanitize=address
LDFLAGS += -fsanitize=address
endif

ifeq ($(CONFIG_UBSAN),y)
COMMON_CFLAGS += -fsanitize=undefined
LDFLAGS += -fsanitize=undefined
endif

COMMON_CFLAGS += -pthread
LDFLAGS += -pthread