diff options
author | Simon Glass <sjg@chromium.org> | 2022-08-03 12:13:08 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-02 16:20:11 -0400 |
commit | a55014d09b29d7bc2cbaeb8e41a155c9a257a183 (patch) | |
tree | 7651a422b0d01a6a8ed0375e8f1a6eff3065df3f /scripts | |
parent | 583f1b2f10be36f86a2da3686d406bfd90cfbc70 (diff) | |
download | u-boot-a55014d09b29d7bc2cbaeb8e41a155c9a257a183.tar.gz u-boot-a55014d09b29d7bc2cbaeb8e41a155c9a257a183.tar.bz2 u-boot-a55014d09b29d7bc2cbaeb8e41a155c9a257a183.zip |
Makefile: Allow LTO to be disabled for a build
LTO (Link-Time Optimisation) is an very useful feature which can
significantly reduce the size of U-Boot binaries. So far it has been
made available for selected ARM boards and sandbox.
However, incremental builds are much slower when LTO is used. For example,
an incremental build of sandbox takes 2.1 seconds on my machine, but 6.7
seconds with LTO enabled.
Add a NO_LTO parameter to the build, similar to NO_SDL, so it can be
disabled during development if needed, for faster builds.
Add some documentation about LTO while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.spl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 3bafeb4fe9..0b3a51da13 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -489,7 +489,7 @@ endif # Rule to link u-boot-spl # May be overridden by arch/$(ARCH)/config.mk -ifdef CONFIG_LTO +ifeq ($(LTO_ENABLE),y) quiet_cmd_u-boot-spl ?= LTO $@ cmd_u-boot-spl ?= \ ( \ |