]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
tools/build: Reject unexpected values for LLVM=
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 26 Feb 2026 21:23:58 +0000 (22:23 +0100)
committerNicolas Schier <nsc@kernel.org>
Tue, 3 Mar 2026 16:42:11 +0000 (17:42 +0100)
Since commit 502678b88cb3 ("kbuild: Reject unexpected values for LLVM=")
the regular kbuild rejects unexpected values of LLVM=1 instead of
silently treating them as LLVM=1.

Align the tools build to kbuild.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260226-kbuild-llvm-followup-v1-2-201cc2a492d9@weissschuh.net
Signed-off-by: Nicolas Schier <nsc@kernel.org>
tools/scripts/Makefile.include

index b5ecf137febcae59f506e107a7f2e2ad72f4bef4..41971a68972dda218714d6b95b1d9d92349285c3 100644 (file)
@@ -56,6 +56,8 @@ ifneq ($(filter %/,$(LLVM)),)
 LLVM_PREFIX := $(LLVM)
 else ifneq ($(filter -%,$(LLVM)),)
 LLVM_SUFFIX := $(LLVM)
+else ifneq ($(LLVM),1)
+$(error Invalid value for LLVM, see Documentation/kbuild/llvm.rst)
 endif
 
 $(call allow-override,CC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX))