From d5358fa34870d1b3dfbf5c64cb4179083a6e2ef9 Mon Sep 17 00:00:00 2001 From: Song Liu Date: Mon, 13 Feb 2023 15:53:29 -0800 Subject: [PATCH] kpatch-build: detect the use of LLVM utilities with CONFIG_AS_IS_LLVM It is common for the user to use LLVM=1 to enable all LLVM untilities. Use CONFIG_AS_IS_LLVM to detect such cases, and add LLVM=1 to MAKEVARS. Signed-off-by: Song Liu --- kpatch-build/kpatch-build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index 45e8b14bf..b9cd06115 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -1118,6 +1118,11 @@ else MAKEVARS+=("LD=${KPATCH_CC_PREFIX}${LD}") fi +# It is common for the user to enable all LLVM utilities with LLVM=1. +# Detech such case with CONFIG_AS_IS_LLVM flag. +if [[ -n "$CONFIG_AS_IS_LLVM" ]]; then + MAKEVARS+=("LLVM=1") +fi # $TARGETS used as list, no quotes. # shellcheck disable=SC2086