Change the default LTO flags on GCC to not pass -flto-partition=none, and allow parallelization of LTO. This has a multiple factor speedup for LTO build times on GCC, with no noticeable loss in performance.
On newer make and newer GCC, this passes the jobserver automatically to GCC (or more like GCC grabs it from the env vars).
On older make, this will have benign warnings about serial compilation. It's safe to ignore them.
--- /dev/null
+Change the default LTO flags on GCC to not pass ``-flto-partition=none``, and allow parallelization of LTO. For newer GNU makes and GCC, this has a multiple factor speedup for LTO build times, with no noticeable loss in performance.
LTOCFLAGS="-flto"
;;
*)
- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
+ LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects"
;;
esac
;;
LTOCFLAGS="-flto"
;;
*)
- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
+ LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects"
;;
esac
;;