summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/Makefile.payload3
1 files changed, 3 insertions, 0 deletions
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))"