enable CONFIG_LTO_CLANG_FULL

This commit is contained in:
Pratham Patel 2023-10-10 14:14:01 +05:30
parent 83491b1a09
commit bb8510ff70
No known key found for this signature in database

View File

@ -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/