[PATCH RESEND v3] Fail the build on RUST=y and RUST_IS_AVAILABLE=n
Sasha Finkelstein <[email protected]>
| Newsgroups | org.kernel.vger.rust-for-linux,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
The current approach of silently disabling all rust drivers if the toolchain is missing results in users that try to compile their own kernels getting a "successful" build and then being confused about where did their drivers go. In comparison, missing openssl results in a build failure, not a disappearance of everything that depends on it. This also means that allyesconfig will depend on rust, but since the rust experiment concluded with "rust is here to stay", i believe that allyesconfig should be building rust drivers too. Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Andreas Hindborg <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Signed-off-by: Sasha Finkelstein <[email protected]> --- Changes in v3: - Collect r-b tags - Rebase on 7.2 - Link to v2: https://patch.msgid.link/[email protected] Changes in v2: - No longer a RFC, let's make it happen. - Update the docs. - Link to v1: https://patch.msgid.link/[email protected] --- Documentation/rust/quick-start.rst | 6 +++--- init/Kconfig | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-start.rst index a6ec3fa94d33..764c81d0dd59 100644 --- a/Documentation/rust/quick-start.rst +++ b/Documentation/rust/quick-start.rst @@ -321,9 +321,9 @@ Configuration ------------- ``Rust support`` (``CONFIG_RUST``) needs to be enabled in the ``General setup`` -menu. The option is only shown if a suitable Rust toolchain is found (see -above), as long as the other requirements are met. In turn, this will make -visible the rest of options that depend on Rust. +menu. In turn, this will make visible the rest of options that depend on Rust. +You can check the value of ``RUST_IS_AVAILABLE`` to determine if your toolchain +is configured correctly. Afterwards, go to:: diff --git a/init/Kconfig b/init/Kconfig index 5230d4879b1c..0eca3dfd9349 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -2207,7 +2207,6 @@ config PROFILING config RUST bool "Rust support" depends on HAVE_RUST - depends on RUST_IS_AVAILABLE select EXTENDED_MODVERSIONS if MODVERSIONS depends on !MODVERSIONS || GENDWARFKSYMS depends on !GCC_PLUGIN_RANDSTRUCT --- base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482 change-id: 20260510-evolve-to-crab-8cba1768dcd5 Best regards, -- Sasha Finkelstein <[email protected]> -- Sasha Finkelstein <[email protected]>