Commit 54a78f41 authored by Michal Berger's avatar Michal Berger Committed by Ben Walker
Browse files

mk/spdk.common: Use -flto=auto for the LTO builds



This tells lto-wrapper to either use make's jobserver or fallback to
auto guessing number of cpu threads used for the build. Mainly, this
should silence the following warning:

lto-wrapper: warning: using serial compilation of N LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more
information

Change-Id: Ib848319c858f4371b94f9264d22449535d25d6da
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17491


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 avatarBen Walker <benjamin.walker@intel.com>
parent 8ad5671f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -97,8 +97,8 @@ COMMON_CFLAGS += -Werror
endif

ifeq ($(CONFIG_LTO),y)
COMMON_CFLAGS += -flto
LDFLAGS += -flto
COMMON_CFLAGS += -flto=auto
LDFLAGS += -flto=auto
endif

ifeq ($(CONFIG_PGO_CAPTURE),y)