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: Nick 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: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
8436569a70
commit
619b8e3733
@ -45,6 +45,10 @@ DPDK_KMODS = true
|
|||||||
endif
|
endif
|
||||||
DPDK_OPTS += -Denable_kmods=$(DPDK_KMODS)
|
DPDK_OPTS += -Denable_kmods=$(DPDK_KMODS)
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DEBUG),y)
|
||||||
|
DPDK_OPTS += --buildtype=debug
|
||||||
|
endif
|
||||||
|
|
||||||
# the drivers we use
|
# the drivers we use
|
||||||
DPDK_DRIVERS = bus bus/pci bus/vdev mempool/ring
|
DPDK_DRIVERS = bus bus/pci bus/vdev mempool/ring
|
||||||
|
|
||||||
@ -79,10 +83,6 @@ endif
|
|||||||
|
|
||||||
DPDK_CFLAGS += -fPIC
|
DPDK_CFLAGS += -fPIC
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG),y)
|
|
||||||
DPDK_CFLAGS += -O0 -g
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_WERROR),y)
|
ifeq ($(CONFIG_WERROR),y)
|
||||||
DPDK_CFLAGS += -Werror
|
DPDK_CFLAGS += -Werror
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user