config: add option to turn on UBSan
Change-Id: Ifb6b86db530d78bffdc28112f5fe1bdfcba6249c Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
6b1e22bd86
commit
1b68a8e705
3
CONFIG
3
CONFIG
@ -43,6 +43,9 @@ CONFIG_COVERAGE?=n
|
|||||||
# Build with Address Sanitizer enabled
|
# Build with Address Sanitizer enabled
|
||||||
CONFIG_ASAN?=n
|
CONFIG_ASAN?=n
|
||||||
|
|
||||||
|
# Build with Undefined Behavior Sanitizer enabled
|
||||||
|
CONFIG_UBSAN?=n
|
||||||
|
|
||||||
# Directory that contains the desired SPDK environment library.
|
# Directory that contains the desired SPDK environment library.
|
||||||
# By default, this is implemented using DPDK.
|
# By default, this is implemented using DPDK.
|
||||||
CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env_dpdk
|
CONFIG_ENV?=$(SPDK_ROOT_DIR)/lib/env_dpdk
|
||||||
|
@ -100,6 +100,11 @@ COMMON_CFLAGS += -fsanitize=address
|
|||||||
LDFLAGS += -fsanitize=address
|
LDFLAGS += -fsanitize=address
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_UBSAN),y)
|
||||||
|
COMMON_CFLAGS += -fsanitize=undefined
|
||||||
|
LDFLAGS += -fsanitize=undefined
|
||||||
|
endif
|
||||||
|
|
||||||
COMMON_CFLAGS += -pthread
|
COMMON_CFLAGS += -pthread
|
||||||
LDFLAGS += -pthread
|
LDFLAGS += -pthread
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user