Commit 619b8e37 authored by Nick Connolly's avatar Nick Connolly Committed by Tomasz Zawadzki
Browse files

dpdkbuild: set --buildtype for debug builds



When ./configure --enable-debug is specified, meson is invoked using
the default 'release' buildtype and '-O0 -g' is added to DPDK_CFLAGS.
Instead, specify --buildtype=debug so that meson knows it is a debug
build, will return the correct value from get_option('buildtype') and
can choose the appropriate toolset options to enable symbolic debugging.
Using --buildtype=debug generates unoptimised code which matches
the current intent.

Tested by building with and without --enable-debug and verifying that
meson reports 'debug' for the debug build.

Signed-off-by: default avatarNick Connolly <nick.connolly@mayadata.io>
Change-Id: Iabb79cd2051145e03fea8fd749cfb18b78e625a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6497


Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 8436569a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -45,6 +45,10 @@ DPDK_KMODS = true
endif
DPDK_OPTS += -Denable_kmods=$(DPDK_KMODS)

ifeq ($(CONFIG_DEBUG),y)
DPDK_OPTS += --buildtype=debug
endif

# the drivers we use
DPDK_DRIVERS = bus bus/pci bus/vdev mempool/ring

@@ -79,10 +83,6 @@ endif

DPDK_CFLAGS += -fPIC

ifeq ($(CONFIG_DEBUG),y)
DPDK_CFLAGS += -O0 -g
endif

ifeq ($(CONFIG_WERROR),y)
DPDK_CFLAGS += -Werror
else