]> git.baikalelectronics.ru Git - uboot.git/commit
Makefile: Allow LTO to be disabled for a build
authorSimon Glass <sjg@chromium.org>
Wed, 3 Aug 2022 18:13:08 +0000 (12:13 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 2 Sep 2022 20:20:11 +0000 (16:20 -0400)
commitdb3c0e915fe324616800c8adf594dc41a29a07f5
tree7651a422b0d01a6a8ed0375e8f1a6eff3065df3f
parentce58667ba6f76fe755b8c1f820586a6bc2dc5259
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>
Makefile
arch/arm/config.mk
arch/arm/include/asm/global_data.h
doc/build/gcc.rst
scripts/Makefile.spl