All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Nicolas Schier <nsc@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	llvm@lists.linux.dev, linux-kbuild@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] tools/build: Reject unexpected values for LLVM=
Date: Thu, 26 Feb 2026 14:45:58 -0700	[thread overview]
Message-ID: <20260226214558.GB1534917@ax162> (raw)
In-Reply-To: <20260226-kbuild-llvm-followup-v1-2-201cc2a492d9@weissschuh.net>

On Thu, Feb 26, 2026 at 10:23:58PM +0100, Thomas Weißschuh wrote:
> 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>
> 
> ---
> There is no formal maintainer for this file.
> IMO this change should go through kbuild.

Ironically I just rejected a tools/ patch going through Kbuild:

  https://lore.kernel.org/20260225192505.GC2755225@ax162/

but since there is no formal maintainer, it is the same change done in
Kbuild, and the risk of fallout is much less than that change, I think
we can make an exception and take it.

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  tools/scripts/Makefile.include | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
> index b5ecf137febc..41971a68972d 100644
> --- a/tools/scripts/Makefile.include
> +++ b/tools/scripts/Makefile.include
> @@ -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))
> 
> -- 
> 2.53.0
> 

  reply	other threads:[~2026-02-26 21:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26 21:23 [PATCH 0/2] kbuild: Follow-up to "Reject unexpected values for LLVM=" Thomas Weißschuh
2026-02-26 21:23 ` [PATCH 1/2] Documentation/llvm: drop note about LLVM=0 Thomas Weißschuh
2026-02-26 21:43   ` Nathan Chancellor
2026-02-27  8:10     ` Nicolas Schier
2026-02-26 21:23 ` [PATCH 2/2] tools/build: Reject unexpected values for LLVM= Thomas Weißschuh
2026-02-26 21:45   ` Nathan Chancellor [this message]
2026-02-27  8:08     ` Nicolas Schier
2026-03-03 16:48 ` [PATCH 0/2] kbuild: Follow-up to "Reject unexpected values for LLVM=" Nicolas Schier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260226214558.GB1534917@ax162 \
    --to=nathan@kernel.org \
    --cc=corbet@lwn.net \
    --cc=justinstitt@google.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=nsc@kernel.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.