* [PATCH] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option
@ 2025-09-09 18:14 Matthew Maurer
2026-02-04 0:16 ` Nathan Chancellor
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Maurer @ 2025-09-09 18:14 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: linux-kbuild, linux-kernel, rust-for-linux, Matthew Maurer
The final version of this macro does not fail in the absence of an
invokable `$(RUSTC)`, so we don't need to be careful not to invoke it.
Link: https://lore.kernel.org/all/CAGSQo01mQfcU1EiW53be1hcts0c1p-HQAab_HBk6VcVmhq3n2Q@mail.gmail.com/
Signed-off-by: Matthew Maurer <mmaurer@google.com>
---
scripts/Kconfig.include | 2 --
1 file changed, 2 deletions(-)
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
index 33193ca6e8030e659d6b321acaea1acd42c387a4..7d9a0b4f66a9667b2cdc9d7e87c582487476f311 100644
--- a/scripts/Kconfig.include
+++ b/scripts/Kconfig.include
@@ -70,8 +70,6 @@ rustc-llvm-version := $(shell,$(srctree)/scripts/rustc-llvm-version.sh $(RUSTC))
# $(rustc-option,<flag>)
# Return y if the Rust compiler supports <flag>, n otherwise
-# Calls to this should be guarded so that they are not evaluated if
-# CONFIG_RUST_IS_AVAILABLE is not set.
# If you are testing for unstable features, consider testing RUSTC_VERSION
# instead, as features may have different completeness while available.
rustc-option = $(success,trap "rm -rf .tmp_$$" EXIT; mkdir .tmp_$$; $(RUSTC) $(1) --crate-type=rlib /dev/null --out-dir=.tmp_$$ -o .tmp_$$/tmp.rlib)
---
base-commit: 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c
change-id: 20250909-docrem-149a48521128
Best regards,
--
Matthew Maurer <mmaurer@google.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option
2025-09-09 18:14 [PATCH] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option Matthew Maurer
@ 2026-02-04 0:16 ` Nathan Chancellor
2026-02-04 7:17 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2026-02-04 0:16 UTC (permalink / raw)
To: Miguel Ojeda, Matthew Maurer; +Cc: linux-kbuild, linux-kernel, rust-for-linux
On Tue, 09 Sep 2025 18:14:20 +0000, Matthew Maurer wrote:
> The final version of this macro does not fail in the absence of an
> invokable `$(RUSTC)`, so we don't need to be careful not to invoke it.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-next
Thanks!
[1/1] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option
https://git.kernel.org/kbuild/c/f2445d6f264c6
Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted. Patches applied to an "unstable" branch are accepted pending
wider testing in -next and any post-commit review; they will generally
be moved to the main branch in a week if no issues are found.
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option
2026-02-04 0:16 ` Nathan Chancellor
@ 2026-02-04 7:17 ` Masahiro Yamada
2026-02-04 7:49 ` Nathan Chancellor
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2026-02-04 7:17 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Miguel Ojeda, Matthew Maurer, linux-kbuild, linux-kernel,
rust-for-linux
On Wed, Feb 4, 2026 at 9:16 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Tue, 09 Sep 2025 18:14:20 +0000, Matthew Maurer wrote:
> > The final version of this macro does not fail in the absence of an
> > invokable `$(RUSTC)`, so we don't need to be careful not to invoke it.
> >
> >
>
> Applied to
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-next
>
> Thanks!
>
> [1/1] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option
> https://git.kernel.org/kbuild/c/f2445d6f264c6
>
> Please look out for regression or issue reports or other follow up
> comments, as they may result in the patch/series getting dropped or
> reverted. Patches applied to an "unstable" branch are accepted pending
> wider testing in -next and any post-commit review; they will generally
> be moved to the main branch in a week if no issues are found.
>
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
>
>
Removing this comment is correct, but please note
the commit description is not accurate.
Kconfig evaluates all $(shell ...) macros before deciding the
value of RUSAT_IS_AVAILABLE.
You cannot prevent Kconfig from evaluating $(shell ...).
The author of c42297438aee7 did not read
Documentation/kbuild/kconfig-macro-language.rst
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option
2026-02-04 7:17 ` Masahiro Yamada
@ 2026-02-04 7:49 ` Nathan Chancellor
0 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2026-02-04 7:49 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Miguel Ojeda, Matthew Maurer, linux-kbuild, linux-kernel,
rust-for-linux
On Wed, Feb 04, 2026 at 04:17:26PM +0900, Masahiro Yamada wrote:
> On Wed, Feb 4, 2026 at 9:16 AM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > On Tue, 09 Sep 2025 18:14:20 +0000, Matthew Maurer wrote:
> > > The final version of this macro does not fail in the absence of an
> > > invokable `$(RUSTC)`, so we don't need to be careful not to invoke it.
> > >
> > >
> >
> > Applied to
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-next
> >
> > Thanks!
> >
> > [1/1] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option
> > https://git.kernel.org/kbuild/c/f2445d6f264c6
> >
> > Please look out for regression or issue reports or other follow up
> > comments, as they may result in the patch/series getting dropped or
> > reverted. Patches applied to an "unstable" branch are accepted pending
> > wider testing in -next and any post-commit review; they will generally
> > be moved to the main branch in a week if no issues are found.
> >
> > Best regards,
> > --
> > Nathan Chancellor <nathan@kernel.org>
> >
> >
>
> Removing this comment is correct, but please note
> the commit description is not accurate.
>
> Kconfig evaluates all $(shell ...) macros before deciding the
> value of RUSAT_IS_AVAILABLE.
> You cannot prevent Kconfig from evaluating $(shell ...).
> The author of c42297438aee7 did not read
> Documentation/kbuild/kconfig-macro-language.rst
Ugh, yes, sorry, I should have caught that too because I just recently
looked at this in another thread :(
https://lore.kernel.org/20260129232535.GD844102@ax162/
I'd rather not rebase at this point but I appreciate you clarifying this
for the record.
Cheers,
Nathan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-04 7:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09 18:14 [PATCH] rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option Matthew Maurer
2026-02-04 0:16 ` Nathan Chancellor
2026-02-04 7:17 ` Masahiro Yamada
2026-02-04 7:49 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox