Commit 92a2649c authored by Sylvain Didelot's avatar Sylvain Didelot Committed by Tomasz Zawadzki
Browse files

dpdkbuild: Compile the DPDK with ASAN if SPDK is configured with ASAN

The DPDK can be built with ASAN support since version 21.11:
https://github.com/DPDK/dpdk/commit/6e0290250d5cfa19a3cdb5e6a30634ddd317c85d



This patch is about to compile the DPDK with ASAN support (meson option
Db_sanitize=address) if the SPDK was configured with --enable-asan.
Also and as recommended by the DPDK ASAN prog guide, the meson option
-Db_lundef=false if the detected compiler is clang.

Signed-off-by: default avatarSylvain Didelot <sdidelot@ddn.com>
Change-Id: I02a6ff9d9caa1c46ec42ae419cf4d1c9e8342f7a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11839


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarSebastian Brzezinka <sebastian.brzezinka@intel.com>
parent 53154ce1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -101,6 +101,16 @@ with e.g. `meson build --cross-file config/arm/arm64_armv8_linux_gcc`)
endif
endif

# DPDK supports ASAN since version 21.11
ifeq ($(CONFIG_ASAN),y)
ifneq ($(OS),Windows)
DPDK_OPTS += -Db_sanitize=address
ifeq ($(CC_TYPE),clang)
DPDK_OPTS += -Db_lundef=false
endif
endif
endif

DPDK_CFLAGS += -fPIC

ifneq ($(CONFIG_MAX_LCORES),)