From 9d3dc031ef39a81f391c9ffd26082485b693b2ef Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Thu, 3 Jun 2021 13:15:52 +0200 Subject: [PATCH] Add a warning about clang LTO usage --- customization.cfg | 1 + linux-tkg-config/prepare | 1 + 2 files changed, 2 insertions(+) diff --git a/customization.cfg b/customization.cfg index 495b5d2..20cbfbd 100644 --- a/customization.cfg +++ b/customization.cfg @@ -86,6 +86,7 @@ _cpusched="" _compiler="" # Clang LTO mode, only available with the "llvm" compiler - options are "no", "full" or "thin". +# ! This is currently experimental and might result in an unbootable kernel - Not recommended ! # "no: do not enable LTO" # "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." diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 6769174..1632a90 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -182,6 +182,7 @@ _set_compiler(){ if [ $_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" _lto_prompt_array=( "No: do not enable LTO" "Full: uses 1 thread for Linking, slow and uses more memory, theoretically with the highest performance gains."