2023-03-19 23:56:34

by Nathan Chancellor

[permalink] [raw]
Subject: Slim and optimized LLVM toolchains for building the Linux kernel

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


2023-03-28 19:28:30

by Nathan Chancellor

[permalink] [raw]
Subject: Re: Slim and optimized LLVM toolchains for building the Linux kernel

On Sun, Mar 19, 2023 at 04:56:21PM -0700, Nathan Chancellor wrote:
> 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/

This is now

https://mirrors.edge.kernel.org/pub/tools/llvm/

so that they are no longer tied directly to my kernel.org account. I
have updated the README with additional information based on feedback
that I have received thus far.

> 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