summaryrefslogtreecommitdiff
path: root/payloads/libpayload/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/Makefile.inc')
-rw-r--r--payloads/libpayload/Makefile.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index 2acf2266da..1b2a883b16 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -64,6 +64,10 @@ CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wvla
CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough
CFLAGS += -Wstrict-aliasing -Wshadow -Werror
+ifeq ($(CONFIG_LP_LTO),y)
+CFLAGS += -flto
+endif
+
$(obj)/libpayload-config.h: $(KCONFIG_AUTOHEADER)
cmp $@ $< 2>/dev/null || cp $< $@