* [PATCH 0/2] kbuild: Follow-up to "Reject unexpected values for LLVM="
@ 2026-02-26 21:23 Thomas Weißschuh
2026-02-26 21:23 ` [PATCH 1/2] Documentation/llvm: drop note about LLVM=0 Thomas Weißschuh
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Thomas Weißschuh @ 2026-02-26 21:23 UTC (permalink / raw)
To: Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
Nicolas Schier, Jonathan Corbet, Shuah Khan
Cc: llvm, linux-kbuild, linux-doc, linux-kernel,
Thomas Weißschuh
Some cleanups.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (2):
Documentation/llvm: drop note about LLVM=0
tools/build: Reject unexpected values for LLVM=
Documentation/kbuild/llvm.rst | 4 ----
tools/scripts/Makefile.include | 2 ++
2 files changed, 2 insertions(+), 4 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260226-kbuild-llvm-followup-5ad6253f85c8
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/2] Documentation/llvm: drop note about LLVM=0 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 ` Thomas Weißschuh 2026-02-26 21:43 ` Nathan Chancellor 2026-02-26 21:23 ` [PATCH 2/2] tools/build: Reject unexpected values for LLVM= Thomas Weißschuh 2026-03-03 16:48 ` [PATCH 0/2] kbuild: Follow-up to "Reject unexpected values for LLVM=" Nicolas Schier 2 siblings, 1 reply; 8+ messages in thread From: Thomas Weißschuh @ 2026-02-26 21:23 UTC (permalink / raw) To: Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt, Nicolas Schier, Jonathan Corbet, Shuah Khan Cc: llvm, linux-kbuild, linux-doc, linux-kernel, Thomas Weißschuh Since commit 502678b88cb3 ("kbuild: Reject unexpected values for LLVM=") LLVM=0 generates an error instead of silently behaving unexpectedly. Drop the now unnecessary note. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- Documentation/kbuild/llvm.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst index bc8a283bc44b..441d8786fcbc 100644 --- a/Documentation/kbuild/llvm.rst +++ b/Documentation/kbuild/llvm.rst @@ -71,10 +71,6 @@ recommend:: PATH=/path/to/llvm/:$PATH make LLVM=-14 -``LLVM=0`` is not the same as omitting ``LLVM`` altogether, it will behave like -``LLVM=1``. If you only wish to use certain LLVM utilities, use their -respective make variables. - The same value used for ``LLVM=`` should be set for each invocation of ``make`` if configuring and building via distinct commands. ``LLVM=`` should also be set as an environment variable when running scripts that will eventually run -- 2.53.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Documentation/llvm: drop note about LLVM=0 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 0 siblings, 1 reply; 8+ messages in thread From: Nathan Chancellor @ 2026-02-26 21:43 UTC (permalink / raw) To: Thomas Weißschuh Cc: Nick Desaulniers, Bill Wendling, Justin Stitt, Nicolas Schier, Jonathan Corbet, Shuah Khan, llvm, linux-kbuild, linux-doc, linux-kernel On Thu, Feb 26, 2026 at 10:23:57PM +0100, Thomas Weißschuh wrote: > Since commit 502678b88cb3 ("kbuild: Reject unexpected values for LLVM=") > LLVM=0 generates an error instead of silently behaving unexpectedly. > > Drop the now unnecessary note. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> It might be worth keeping the note about LLVM=0 not being the same as omitting LLVM altogether, as neither the documentation nor the error message will say why that is not a valid value. Maybe: ``LLVM=0`` is not the same as omitting ``LLVM`` altogether. If you only wish to use certain LLVM utilities, use their respective make variables. I don't feel that strongly about it though. Regardless: Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > Documentation/kbuild/llvm.rst | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst > index bc8a283bc44b..441d8786fcbc 100644 > --- a/Documentation/kbuild/llvm.rst > +++ b/Documentation/kbuild/llvm.rst > @@ -71,10 +71,6 @@ recommend:: > > PATH=/path/to/llvm/:$PATH make LLVM=-14 > > -``LLVM=0`` is not the same as omitting ``LLVM`` altogether, it will behave like > -``LLVM=1``. If you only wish to use certain LLVM utilities, use their > -respective make variables. > - > The same value used for ``LLVM=`` should be set for each invocation of ``make`` > if configuring and building via distinct commands. ``LLVM=`` should also be set > as an environment variable when running scripts that will eventually run > > -- > 2.53.0 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Documentation/llvm: drop note about LLVM=0 2026-02-26 21:43 ` Nathan Chancellor @ 2026-02-27 8:10 ` Nicolas Schier 0 siblings, 0 replies; 8+ messages in thread From: Nicolas Schier @ 2026-02-27 8:10 UTC (permalink / raw) To: Nathan Chancellor Cc: Thomas Weißschuh, Nick Desaulniers, Bill Wendling, Justin Stitt, Jonathan Corbet, Shuah Khan, llvm, linux-kbuild, linux-doc, linux-kernel On Thu, Feb 26, 2026 at 02:43:49PM -0700, Nathan Chancellor wrote: > On Thu, Feb 26, 2026 at 10:23:57PM +0100, Thomas Weißschuh wrote: > > Since commit 502678b88cb3 ("kbuild: Reject unexpected values for LLVM=") > > LLVM=0 generates an error instead of silently behaving unexpectedly. > > > > Drop the now unnecessary note. > > > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > > It might be worth keeping the note about LLVM=0 not being the same as > omitting LLVM altogether, as neither the documentation nor the error > message will say why that is not a valid value. Maybe: > > ``LLVM=0`` is not the same as omitting ``LLVM`` altogether. If you > only wish to use certain LLVM utilities, use their respective make > variables. Yeah, I think that would be a good thing to add, too. W/ or w/o: Reviewed-by: Nicolas Schier <nsc@kernel.org> If nobody complains, I am going to add both patches to kbuild-next within a few days. Kind regards, Nicolas > I don't feel that strongly about it though. Regardless: > > Reviewed-by: Nathan Chancellor <nathan@kernel.org> > > > --- > > Documentation/kbuild/llvm.rst | 4 ---- > > 1 file changed, 4 deletions(-) > > > > diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst > > index bc8a283bc44b..441d8786fcbc 100644 > > --- a/Documentation/kbuild/llvm.rst > > +++ b/Documentation/kbuild/llvm.rst > > @@ -71,10 +71,6 @@ recommend:: > > > > PATH=/path/to/llvm/:$PATH make LLVM=-14 > > > > -``LLVM=0`` is not the same as omitting ``LLVM`` altogether, it will behave like > > -``LLVM=1``. If you only wish to use certain LLVM utilities, use their > > -respective make variables. > > - > > The same value used for ``LLVM=`` should be set for each invocation of ``make`` > > if configuring and building via distinct commands. ``LLVM=`` should also be set > > as an environment variable when running scripts that will eventually run > > > > -- > > 2.53.0 > > -- Nicolas ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] tools/build: Reject unexpected values for LLVM= 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:23 ` Thomas Weißschuh 2026-02-26 21:45 ` Nathan Chancellor 2026-03-03 16:48 ` [PATCH 0/2] kbuild: Follow-up to "Reject unexpected values for LLVM=" Nicolas Schier 2 siblings, 1 reply; 8+ messages in thread From: Thomas Weißschuh @ 2026-02-26 21:23 UTC (permalink / raw) To: Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt, Nicolas Schier, Jonathan Corbet, Shuah Khan Cc: llvm, linux-kbuild, linux-doc, linux-kernel, Thomas Weißschuh 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. --- 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 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] tools/build: Reject unexpected values for LLVM= 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 2026-02-27 8:08 ` Nicolas Schier 0 siblings, 1 reply; 8+ messages in thread From: Nathan Chancellor @ 2026-02-26 21:45 UTC (permalink / raw) To: Thomas Weißschuh Cc: Nick Desaulniers, Bill Wendling, Justin Stitt, Nicolas Schier, Jonathan Corbet, Shuah Khan, llvm, linux-kbuild, linux-doc, linux-kernel 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 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] tools/build: Reject unexpected values for LLVM= 2026-02-26 21:45 ` Nathan Chancellor @ 2026-02-27 8:08 ` Nicolas Schier 0 siblings, 0 replies; 8+ messages in thread From: Nicolas Schier @ 2026-02-27 8:08 UTC (permalink / raw) To: Nathan Chancellor Cc: Thomas Weißschuh, Nick Desaulniers, Bill Wendling, Justin Stitt, Jonathan Corbet, Shuah Khan, llvm, linux-kbuild, linux-doc, linux-kernel On Thu, Feb 26, 2026 at 02:45:58PM -0700, Nathan Chancellor wrote: > 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. +1 > Reviewed-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nicolas Schier <nsc@kernel.org> -- Nicolas ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] kbuild: Follow-up to "Reject unexpected values for LLVM=" 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:23 ` [PATCH 2/2] tools/build: Reject unexpected values for LLVM= Thomas Weißschuh @ 2026-03-03 16:48 ` Nicolas Schier 2 siblings, 0 replies; 8+ messages in thread From: Nicolas Schier @ 2026-03-03 16:48 UTC (permalink / raw) To: Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt, Jonathan Corbet, Shuah Khan, Thomas Weißschuh Cc: Nicolas Schier, llvm, linux-kbuild, linux-doc, linux-kernel On Thu, 26 Feb 2026 22:23:56 +0100, Thomas Weißschuh wrote: > Some cleanups. > > Applied to kbuild/linux.git (kbuild-for-next), thanks! [1/2] Documentation/llvm: drop note about LLVM=0 https://git.kernel.org/kbuild/c/8830b2e5 [2/2] tools/build: Reject unexpected values for LLVM= https://git.kernel.org/kbuild/c/7239ae53 Please look out for regression or issue reports or other follow up comments, as they may result in the patch/series getting dropped, reverted or modified (e.g. trailers). Patches applied to a kbuild-*-unstable branch are accepted pending wider testing in linux-next and any post-commit review; they will generally be moved to the main branch (kbuild-next or kbuild-fixes) in a week if no issues are found. Best regards, -- Nicolas ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-03-03 16:48 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox