Skip to content

linux-cachyos-rc: Add support for Distributed ThinLTO #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions linux-cachyos-rc/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@
# ATTENTION - one of three predefined values should be selected!
# "full: uses 1 thread for Linking, slow and uses more memory, theoretically with the highest performance gains."
# "thin: uses multiple threads, faster and uses less memory, may have a lower runtime performance than Full."
# "thin-dist: Similar to thin, but uses a distributed model rather than in-process"
# "none: disable LTO
: "${_use_llvm_lto:=thin}"
: "${_use_llvm_lto:=thin-dist}"

# Use suffix -lto only when requested by the user
# yes - enable -lto suffix
Expand Down Expand Up @@ -150,7 +151,7 @@

# ATTENTION: Do not modify after this line
_is_lto_kernel() {
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]]
[[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" || "$_use_llvm_lto" = "thin-dist" ]]
return $?
}

Expand Down Expand Up @@ -341,6 +342,7 @@ prepare() {
### Select LLVM level
case "$_use_llvm_lto" in
thin) scripts/config -e LTO_CLANG_THIN;;
thin-dist) scripts/config -e LTO_CLANG_THIN_DIST;;
full) scripts/config -e LTO_CLANG_FULL;;
none) scripts/config -e LTO_NONE;;
*) _die "The value '$_use_llvm_lto' is invalid. Choose the correct one again.";;
Expand Down
1 change: 1 addition & 0 deletions linux-cachyos/config
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ CONFIG_HAS_LTO_CLANG=y
CONFIG_LTO_NONE=y
# CONFIG_LTO_CLANG_FULL is not set
# CONFIG_LTO_CLANG_THIN is not set
# CONFIG_LTO_CLANG_THIN_DIST is not set
CONFIG_ARCH_SUPPORTS_AUTOFDO_CLANG=y
# CONFIG_AUTOFDO_CLANG is not set
CONFIG_ARCH_SUPPORTS_PROPELLER_CLANG=y
Expand Down