Slim and optimized LLVM toolchains for building the Linux kernel

From: Nathan Chancellor
Date: Sun Mar 19 2023 - 19:56:35 EST


Hi everyone,

To make building the Linux kernel with clang/LLVM easier and more
accessible to people (since distributions tend to only package one
version at a time and it may be old or have bugs that have since been
fixed), I have uploaded some slim, profile guided optimized LLVM toolchains
to my section of kernel.org/pub:

https://mirrors.edge.kernel.org/pub/linux/kernel/people/nathan/llvm/

The landing page should have all the relevant information but if I need
to clarify or expand on anything, I am more than happy to do so.

Due to benchmarking the compilers against the kernel during PGO, they
can handily beat distribution versions that have not been optimized:

https://gist.github.com/nathanchance/8d1abed70077ac92cb198ef32389072e

I aim to keep these up to date with the latest stable versions of LLVM
as they are released (so 16.0.0 will be replaced with 16.0.1 when it is
released, etc).

Cheers,
Nathan