Allow LTO mode on 6.*+

This commit is contained in:
Tk-Glitch
2022-09-01 15:46:32 +02:00
parent 97a122b5d5
commit d65f578346

View File

@@ -261,7 +261,7 @@ _set_compiler(){
if [ "$_compiler" = "llvm" ]; then
_compiler_name="-llvm"
llvm_opt="LLVM=1 LLVM_IAS=${_llvm_ias:-0}"
if [ $_basever -ge 512 ]; then
if [[ "$_basever" = 6* ]] || ( [[ "$_basever" = 5* ]] && [ $_basever -ge 512 ] ); then
if [[ -z "$_lto_mode" || ! "$_lto_mode" =~ ^(no|thin|full)$ ]]; then
plain "Would you like to enable Clang Link Time Optimizations (LTO) ? It may improve the performance of the kernel."
warning "This is currently experimental and might result in an unbootable kernel - Not recommended"