From 29e4e4a851f6e9e68eb34aa31d7a78b510648866 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 6 Sep 2022 15:22:28 +0000 Subject: [PATCH] dpdkbuild: enable LTO When user specifies SPDK LTO build, pass the associated option to the DPDK build to enable LTO there as well. Signed-off-by: Jim Harris Change-Id: I5996ae0668ad00c52fcaeb28db055af8dc85a8ca Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14389 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Aleksey Marchuk --- dpdkbuild/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile index 6424a6009..cf4607ce4 100644 --- a/dpdkbuild/Makefile +++ b/dpdkbuild/Makefile @@ -23,6 +23,10 @@ ifeq ($(CONFIG_DEBUG),y) DPDK_OPTS += --buildtype=debug endif +ifeq ($(CONFIG_LTO),y) +DPDK_OPTS += -Db_lto=true +endif + # the drivers we use DPDK_DRIVERS = bus bus/pci bus/vdev mempool/ring