flavour-lto.mk 823 B

1234567891011121314151617181920
  1. # This flavour enables link-time optimization (LTO).
  2. # This requires GCC 4.5 or higher; it's known to work on GCC 4.6.3.
  3. include build/flavour-opt.mk
  4. # Enable LTO for compiling and linking.
  5. # Don't bother with native code output in the compile phase, since new code
  6. # will be generated in the link phase.
  7. # Ideally LTO would be enabled for the 3rdparty libs as well, but I haven't
  8. # been able to make that work.
  9. COMPILE_FLAGS+=-flto
  10. LINK_FLAGS+=-flto=jobserver
  11. # Enable this line to speed up compilation. This is supported from gcc-4.7
  12. # onward. Quote from the gcc manual:
  13. # -fno-fat-lto-objects improves compilation time over plain LTO, but
  14. # requires the complete toolchain to be aware of LTO. It requires a
  15. # linker with linker plugin support for basic functionality.
  16. #COMPILE_FLAGS+=-fno-fat-lto-objects