From 987eeca6b21c47a99c3fb0c0bb807245d5d9cede Mon Sep 17 00:00:00 2001 From: James Beddek Date: Tue, 5 Oct 2021 22:53:14 +1300 Subject: [PATCH] prepare: allow forcing LLVM_IAS (#314) Signed-off-by: Theo Anderson --- customization.cfg | 4 ++++ linux-tkg-config/prepare | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/customization.cfg b/customization.cfg index 5207fc2..7c5fdad 100644 --- a/customization.cfg +++ b/customization.cfg @@ -100,6 +100,10 @@ _cpusched="" # For advanced users. _compiler="" +# Force the use of the LLVM Integrated Assembler whether using LLVM, LTO or not. +# Set to "1" to enable. +_llvm_ias="" + # 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" diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 6cfd198..6847efd 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -186,7 +186,7 @@ _set_compiler(){ if [ "$_compiler" = "llvm" ]; then _compiler_name="-llvm" - llvm_opt="LLVM=1" + llvm_opt="LLVM=1 LLVM_IAS=${_llvm_ias:-0}" 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."