From 43bcbb0d560e46b58880db2bda12aa21027fcb08 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 21 Aug 2024 13:49:56 +0200 Subject: libpayload/Makefile.payload: Add lto flags Change-Id: If4496e300dd239b8652285bab05c2f68a51b4437 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/84015 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- payloads/libpayload/Makefile.payload | 3 +++ 1 file changed, 3 insertions(+) diff --git a/payloads/libpayload/Makefile.payload b/payloads/libpayload/Makefile.payload index d2860bf42d..2eafd4bec3 100644 --- a/payloads/libpayload/Makefile.payload +++ b/payloads/libpayload/Makefile.payload @@ -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))" -- cgit v1.2.3