Open GrabbenD opened 7 months ago
I agree, but let's start slow. I believe our default kernel build should become Clang+march=arch+LTO first and then we'll move on to packages :)
If you look at the benchmarks, it would be worth it. But only for selected packages. Also because it probably means a lot of work to get various packages compiled with clang. On the other hand, there are also packages that are significantly slower when compiled with clang than the gcc variants.
Currently the "cachybuilder" does not support automatic custom patching for the automatic rebuild of the archlinux packages. Since not all packages are possible to build against clang, a lot of packages would fail.
Generally I think, it would be worth for selected packages. We are already moving a lot of custom packages, which gets PGOd to be clang built, see https://github.com/CachyOS/CachyOS-PKGBUILDS/
@BlueSwordM I don't think, if it is good to provide "linux-cachyos-lto" as the default package. There are still some issues, with (Thin)LTO build kernels, specially dkms modules. Also dkms has currently a very annoying bug, which affects ThinLTO: https://github.com/dell/dkms/issues/292
We should also look first, if the results from phoronix are reproduceable or does only affect specially metor lake builds, on top we should look how the performance of gcc14 does look and if they further improved it.
News
Clang 17 has surpassed GCC 13 in execution performance as demonstrated here: https://www.phoronix.com/review/intel-meteorlake-gcc-clang https://www.phoronix.com/news/LLVM-Clang-Chimera-Linux-2024
Why
Providing a optimized repository with LLVM/Clang + LTO builds would be another massive milestone for CachyOS, which as everyone knows, is already the leading distribution for raw performance.
Only a couple of distributions build their packages with Clang such as:
Gentoo
(which requires a lot of time).Serpent OS
(where unfortunately the head developer has a poor reputation for his tendency to abanadon projects).OpenMandriva
With this in mind, such milestone would position CachyOS distribution in a very unique position due to low competition hence why this could potentially help in growing the user base exponentially.
Edit: EAC Anti-Cheat tends to break when
glibc
gets updated. LLVM could potentially circumvent this issue once LLVM LibC is in a good stateThere's a lot of widely known benefits of using Clang such as:
This has has already been attempted in the past and has shown a clear performance improvement which made animations smoother: https://bbs.archlinux.org/viewtopic.php?id=267742
Love to hear your guys opinions on this!