Skip to content
  • Simon Glass's avatar
    Makefile: v2 Allow LTO to be disabled for a build · 2d4ebfb0
    Simon Glass authored
    
    
    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 LTO_BUILD=n parameter to the build, 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's avatarSimon Glass <sjg@chromium.org>
    Series-to: u-boot
    Series-cc: trini, heinrich
    Series-cc: Marek Behún <marek.behun@nic.cz>
    2d4ebfb0