From bb8510ff7058d15147b5084d05b59aef3cc3ca12 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Tue, 10 Oct 2023 14:14:01 +0530 Subject: [PATCH] enable CONFIG_LTO_CLANG_FULL --- extra-configs/optimize_lto.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 extra-configs/optimize_lto.sh 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/