diff --git a/extra-configs/optimize_lto.sh b/extra-configs/optimize_lto.sh new file mode 100644 index 0000000..2331430 --- /dev/null +++ b/extra-configs/optimize_lto.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +./scripts/config --file .config --enable LTO_CLANG_FULL +# Q: What requires this option to be enabled? +# A: Enabling this option adds support for Clang's Link Time Optimization, +# resulting in a nice performance uplift. +# +# Q: Why wasn't this option enabled by `make defconfig`? +# A: There are two reasons for this: +# 1. The "FULL" LTO option uses a lot of RAM during build-time. +# 2. Just like '-O3', "FULL" LTO means a "bigger" kernel. +# +# Both point are discussed here: +# https://github.com/ClangBuiltLinux/linux/issues/1643/