libpayload/Makefile.payload: Add lto flags

Change-Id: If4496e300dd239b8652285bab05c2f68a51b4437
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84015
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2024-08-21 13:49:56 +02:00 committed by Nico Huber
commit 43bcbb0d56

View file

@ -85,6 +85,9 @@ endif
CFLAGS = $(CFLAGS_$(ARCH))
CFLAGS += -Os -ffreestanding
CFLAGS += -Wall -Wextra -Wmissing-prototypes -Wvla -Werror
ifeq ($(CONFIG_LP_LTO),y)
CFLAGS += -flto
endif
# `lpgcc` in in-tree mode:
LPGCC = CC="$(CCACHE) $(CC_$(ARCH))"