`RUSTC_VERSION` and re-config/re-build support on compiler change
Subsystems (3)
Miguel Ojeda
maintainerv2 cover `RUSTC_VERSION` and re-config/re-build support on compiler change
This series mainly adds support for CONFIG_RUSTC_VERSION (which is needed for other upcoming series) as well as support for rebuilding the kernel when the Rust compiler version text changes, plus other secondary improvements.
v1: https://lore.kernel.org/rust-for-linux/[email protected]/
v2:
- Dropped patch #2 "kbuild: rust: make command for RUSTC_VERSION_TEXT closer to the CC one" (Masahiro, Björn).
In other words, now the RUSTC_VERSION_TEXT command is kept as it was, without LC_ALL=1 nor | head -n1.
- Replaced macros crate dependency with a comment in the code that fixdep will find, since we can do it for that one, unlike core (Masahiro, Nicolas).
- Added patch (here #5) to add a warning when the Rust compiler used to build the kernel differs from the one used to build an out-of-tree module, like the C side does (Nicolas).
If the patch is not wanted, then it can be skipped without much loss, since anyway Rust will fail to compile in that case. However, it would be nice to have to prevent potentially unexpected situations and to clarify the errors that rustc would emit later. See the commit message for more details.
- Rewrapped comment to stay under 80 lines (Nicolas).
- Picked up a couple tags that could more or less be reasonably taken given the changes to v2. Re-runs of tests welcome!
Miguel Ojeda (6):
kbuild: rust: add CONFIG_RUSTC_VERSION
kbuild: rust: re-run Kconfig if the version text changes
kbuild: rust: rebuild if the version text changes
kbuild: rust: replace proc macros dependency on core.o with the
version text
kbuild: rust: warn if the out-of-tree compiler differs from the kernel
one
docs: rust: include other expressions in conditional compilation
section
Documentation/rust/general-information.rst | 8 +++++++ Makefile | 18 ++++++++++----- init/Kconfig | 11 ++++++++- rust/Makefile | 7 +++--- rust/macros/lib.rs | 4 ++++ scripts/rustc-version.sh | 26 ++++++++++++++++++++++ 6 files changed, 64 insertions(+), 10 deletions(-) create mode 100755 scripts/rustc-version.sh
base-commit: a335e95914046c6bed45c0d17cabcd483682cf5e --
2.46.0
Miguel Ojeda
maintainerPATCH v2 1/6 kbuild: rust: add `CONFIG_RUSTC_VERSION`
Now that we support several Rust versions, introduce CONFIG_RUSTC_VERSION so that it can be used in Kconfig to enable and disable configuration options based on the rustc version.
The approach taken resembles pahole's -- see commit 613fe1692377 ("kbuild: Add CONFIG_PAHOLE_VERSION"), i.e. a simple version parsing without trying to identify several kinds of compilers, since so far there is only one (rustc).
However, unlike pahole's, we also print a zero if executing failed for any reason, rather than checking if the command is found and executable (which still leaves things like a file that exists and is executable, but e.g. is built for another platform [1]). An equivalent approach to the one here was also submitted for pahole [2].
--- init/Kconfig | 7 +++++++ scripts/rustc-version.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 scripts/rustc-version.sh
init/Kconfig +7 -0
@@ -60,6 +60,13 @@ config LLD_VERSION default $(ld-version) if LD_IS_LLD default 0 +config RUSTC_VERSION + int + default $(shell,$(srctree)/scripts/rustc-version.sh $(RUSTC)) + help + It does not depend on `RUST` since that one may need to use the version + in a `depends on`. + config RUST_IS_AVAILABLE def_bool $(success,$(srctree)/scripts/rust_is_available.sh) help
scripts/rustc-version.sh new file +26 -0
@@ -0,0 +1,26 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# +# Usage: $ ./rustc-version.sh rustc +# +# Print the Rust compiler name and its version in a 6 or 7-digit form. + +# Convert the version string x.y.z to a canonical up-to-7-digits form. +# +# Note that this function uses one more digit (compared to other +# instances in other version scripts) to give a bit more space to +# `rustc` since it will reach 1.100.0 in late 2026. +get_canonical_version() +{ + IFS=. + set -- $1 + echo $((100000 * $1 + 100 * $2 + $3)) +} + +if output=$("$@" --version 2>/dev/null); then + set -- $output + get_canonical_version $2 +else + echo 0 + exit 1 +fi
Signature · 1 line
2.46.0
Re: [PATCH v2 1/6] kbuild: rust: add `CONFIG_RUSTC_VERSION`
Quoted 51 lines · Miguel Ojeda
Now that we support several Rust versions, introduce
CONFIG_RUSTC_VERSIONso that it can be used inKconfigto enable and disable configuration options based on therustcversion.The approach taken resembles
pahole's -- see commit613fe1692377("kbuild: AddCONFIG_PAHOLE_VERSION"), i.e. a simple version parsing without trying to identify several kinds of compilers, since so far there is only one (rustc).However, unlike
pahole's, we also print a zero if executing failed for any reason, rather than checking if the command is found and executable (which still leaves things like a file that exists and is executable, but e.g. is built for another platform [1]). An equivalent approach to the one here was also submitted forpahole[2].Link https://lore.kernel.org/rust-for-linux/CANiq72=4vX_tJMJLE6e+bg7ZECHkS-AQpm8GBzuK75G1EB7+Nw@mail.gmail.com/ [1] open hereReviewed-by Nicolas Schier <[email protected]>Tested-by Alice Ryhl <[email protected]>Signed-off-by Miguel Ojeda <[email protected]>--- init/Kconfig | 7 +++++++ scripts/rustc-version.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 scripts/rustc-version.shinit/Kconfig +7
-0@@ -60,6 +60,13 @@ config LLD_VERSION default $(ld-version) if LD_IS_LLD default 0 +config RUSTC_VERSION + int + default $(shell,$(srctree)/scripts/rustc-version.sh $(RUSTC)) + help + It does not depend on `RUST` since that one may need to use the version + in a `depends on`. + config RUST_IS_AVAILABLE def_bool $(success,$(srctree)/scripts/rust_is_available.sh) helpscripts/rustc-version.sh new file +0
-0
scripts/rustc-version.sh line 6
Quoted 6 lines
scripts/rustc-version.sh new file +6
-0@@ -0,0 +1,26 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# +# Usage: $ ./rustc-version.sh rustc +# +# Print the Rust compiler name and its version in a 6 or 7-digit form.
This script does not print the name.
Only the version.
Quoted 23 lines
scripts/rustc-version.sh new file +20
-1+ +# Convert the version string x.y.z to a canonical up-to-7-digits form. +# +# Note that this function uses one more digit (compared to other +# instances in other version scripts) to give a bit more space to +# `rustc` since it will reach 1.100.0 in late 2026. +get_canonical_version() +{ + IFS=. + set -- $1 + echo $((100000 * $1 + 100 * $2 + $3)) +} + +if output=$("$@" --version 2>/dev/null); then + set -- $output + get_canonical_version $2 +else + echo 0 + exit 1 +fi --2.46.0
Signature · 2 lines
Best Regards Masahiro Yamada
Re: [PATCH v2 1/6] kbuild: rust: add `CONFIG_RUSTC_VERSION`
Quoted 4 lines · Masahiro Yamada
This script does not print the name.
Only the version.
Good catch -- fixed!
Cheers,
Miguel
Miguel Ojeda
maintainerPATCH v2 2/6 kbuild: rust: re-run Kconfig if the version text changes
In reply to Miguel OjedaRe-run Kconfig if we detect the Rust compiler has changed via the version text, like it is done for C.
Unlike C, and unlike RUSTC_VERSION, the RUSTC_VERSION_TEXT is kept under depends on RUST, since it should not be needed unless RUST is enabled.
--- Makefile | 8 +++++--- init/Kconfig | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-)
Makefile +5 -3
@@ -648,9 +648,11 @@ endif # The expansion should be delayed until arch/$(SRCARCH)/Makefile is included. # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. -# CC_VERSION_TEXT is referenced from Kconfig (so it needs export), -# and from include/config/auto.conf.cmd to detect the compiler upgrade. +# CC_VERSION_TEXT and RUSTC_VERSION_TEXT are referenced from Kconfig (so they +# need export), and from include/config/auto.conf.cmd to detect the compiler +# upgrade. CC_VERSION_TEXT = $(subst $(pound),,$(shell LC_ALL=C $(CC) --version 2>/dev/null | head -n 1)) +RUSTC_VERSION_TEXT = $(subst $(pound),,$(shell $(RUSTC) --version 2>/dev/null)) ifneq ($(findstring clang,$(CC_VERSION_TEXT)),) include $(srctree)/scripts/Makefile.clang
@@ -671,7 +673,7 @@ ifdef config-build # KBUILD_DEFCONFIG may point out an alternative default configuration # used for 'make defconfig' include $(srctree)/arch/$(SRCARCH)/Makefile -export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT +export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT RUSTC_VERSION_TEXT config: outputmakefile scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@
init/Kconfig +3 -1
@@ -1927,7 +1927,9 @@ config RUST config RUSTC_VERSION_TEXT string depends on RUST - default "$(shell,$(RUSTC) --version 2>/dev/null)" + default "$(RUSTC_VERSION_TEXT)" + help + See `CC_VERSION_TEXT`. config BINDGEN_VERSION_TEXT string
Signature · 1 line
2.46.0
Miguel Ojeda
maintainerPATCH v2 3/6 kbuild: rust: rebuild if the version text changes
In reply to Miguel OjedaNow that RUSTC_VERSION_TEXT exists, use it to rebuild core when the version text changes (which in turn will trigger a rebuild of all the kernel Rust code).
This also applies to proc macros (which only work with the rustc that compiled them), via the already existing dependency on core.o. That is cleaned up in the next commit.
However, this does not cover host programs written in Rust, which is the same case in the C side.
This is accomplished by referencing directly the generated file, instead of using the fixdep header trick, since we cannot change the Rust standard library sources. This is not too much of a burden, since it only needs to be done for core.
--- rust/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
rust/Makefile +2 -1
@@ -389,7 +389,8 @@ $(obj)/core.o: private skip_clippy = 1 $(obj)/core.o: private skip_flags = -Wunreachable_pub $(obj)/core.o: private rustc_objcopy = $(foreach sym,$(redirect-intrinsics),--redefine-sym $(sym)=__rust$(sym)) $(obj)/core.o: private rustc_target_flags = $(core-cfgs) -$(obj)/core.o: $(RUST_LIB_SRC)/core/src/lib.rs FORCE +$(obj)/core.o: $(RUST_LIB_SRC)/core/src/lib.rs \ + $(wildcard $(objtree)/include/config/RUSTC_VERSION_TEXT) FORCE +$(call if_changed_rule,rustc_library) ifneq ($(or $(CONFIG_X86_64),$(CONFIG_X86_32)),) $(obj)/core.o: scripts/target.json
Signature · 1 line
2.46.0
Miguel Ojeda
maintainerPATCH v2 4/6 kbuild: rust: replace proc macros dependency on `core.o` with the version text
In reply to Miguel OjedaWith the RUSTC_VERSION_TEXT rebuild support in place, now proc macros can depend on that instead of core.o.
This means that both the core and macros crates can be built in parallel, and that touching core.o does not trigger a rebuild of the proc macros.
This could be accomplished using the same approach as for core (i.e. depending directly on include/config/RUSTC_VERSION_TEXT). However, that is considered an implementation detail [1], and thus it is best to avoid it. Instead, let fixdep find a string that we explicitly write down in the source code for this purpose (like it is done for include/linux/compiler-version.h), which we can easily do (unlike for core) since this is our own source code.
--- rust/Makefile | 4 +--- rust/macros/lib.rs | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-)
rust/Makefile +1 -3
@@ -342,9 +342,7 @@ quiet_cmd_rustc_procmacro = $(RUSTC_OR_CLIPPY_QUIET) P $@ --crate-name $(patsubst lib%.so,%,$(notdir $@)) $< # Procedural macros can only be used with the `rustc` that compiled it. -# Therefore, to get `libmacros.so` automatically recompiled when the compiler -# version changes, we add `core.o` as a dependency (even if it is not needed). -$(obj)/libmacros.so: $(src)/macros/lib.rs $(obj)/core.o FORCE +$(obj)/libmacros.so: $(src)/macros/lib.rs FORCE +$(call if_changed_dep,rustc_procmacro) quiet_cmd_rustc_library = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) L $@
rust/macros/lib.rs +4 -0
@@ -2,6 +2,10 @@//! Crate for all kernel procedural macros. +// When fixdep scans this, it will find this string `CONFIG_RUSTC_VERSION_TEXT` +// and thus add a dependency on `include/config/RUSTC_VERSION_TEXT`, which is +// touched by Kconfig when the version string from the compiler changes. +#[macro_use] mod quote;mod concat_idents;
Signature · 1 line
2.46.0
Miguel Ojeda
maintainerPATCH v2 5/6 kbuild: rust: warn if the out-of-tree compiler differs from the kernel one
In reply to Miguel OjedaFor out-of-tree modules, in the C side, Kbuild warns if the C compiler differs from the one used to build the kernel.
Do the same for Rust, except that we add the extra condition that Rust support was enabled in the kernel.
For instance, the output will look like:
warning: the Rust compiler differs from the one used to build the kernel
The kernel was built by: rustc 1.78.0 (9b00956e5 2024-04-29)
You are using: rustc 1.79.0 (129f3b996 2024-06-10)Note that the build will fail later anyway in such a case, since the Rust compiler checks for incompatible Rust versions, e.g.:
RUSTC [M] rust-out-of-tree-module/rust_out_of_tree.o
error[E0514]: found crate core compiled by an incompatible version of rustc
|
= note: the following crate versions were found:
crate core compiled by rustc 1.78.0 (9b00956e5 2024-04-29): rust/libcore.rmeta
= help: please recompile that crate using this compiler (rustc 1.79.0 (129f3b996 2024-06-10)) (consider running cargo clean first)
Nevertheless, the added warning at the top should hopefully make the situation clearer.
The extra condition on CONFIG_RUST=y is added since otherwise users would get warnings when a Rust compiler is reachable, e.g. the most likely case today is that they are building a C module for a kernel that does not have Rust enabled.
However, if Rust was indeed enabled, then we do print the warning in all cases, e.g. even if they are building a C module. While it may not matter in some cases, it may still be a sign that something unexpectedly changed in the environment they may want to be aware of:
warning: the Rust compiler differs from the one used to build the kernel
The kernel was built by: rustc 1.78.0 (9b00956e5 2024-04-29)
You are using: rustc 1.79.0 (129f3b996 2024-06-10)
CC [M] c-out-of-tree-module/c_out_of_tree.o
Note that the check will also trigger for cases where the user does not have the Rust compiler installed, including when building a C module:
warning: the Rust compiler differs from the one used to build the kernel
The kernel was built by: rustc 1.78.0 (9b00956e5 2024-04-29) You are using:
CC [M] c-out-of-tree-module/c_out_of_tree.o
--- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Makefile +8 -2
@@ -1794,14 +1794,20 @@ clean: private rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modu $(KBUILD_EXTMOD)/compile_commands.json PHONY += prepare -# now expand this into a simple variable to reduce the cost of shell evaluations +# now expand these into simple variables to reduce the cost of shell evaluations prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT) +prepare: RUSTC_VERSION_TEXT := $(RUSTC_VERSION_TEXT) prepare: @if [ "$(CC_VERSION_TEXT)" != "$(CONFIG_CC_VERSION_TEXT)" ]; then \ - echo >&2 "warning: the compiler differs from the one used to build the kernel"; \ + echo >&2 "warning: the C compiler differs from the one used to build the kernel"; \ echo >&2 " The kernel was built by: $(CONFIG_CC_VERSION_TEXT)"; \ echo >&2 " You are using: $(CC_VERSION_TEXT)"; \ fi + @if [ "$(CONFIG_RUST)" = "y" -a "$(RUSTC_VERSION_TEXT)" != "$(CONFIG_RUSTC_VERSION_TEXT)" ]; then \ + echo >&2 "warning: the Rust compiler differs from the one used to build the kernel"; \ + echo >&2 " The kernel was built by: $(CONFIG_RUSTC_VERSION_TEXT)"; \ + echo >&2 " You are using: $(RUSTC_VERSION_TEXT)"; \ + fi PHONY += help help:
Signature · 1 line
2.46.0
Re: [PATCH v2 5/6] kbuild: rust: warn if the out-of-tree compiler differs from the kernel one
Hi Miguel,
When you applied the rest of this series you held this patch back "to give people more time to look at it". Nicolas reviewed and Alice tested the series at the time, but nobody commented on this patch, and it never went in. Here is a case from the field where it would have helped.
Arch Linux users building an out-of-tree Rust module with DKMS (the bcachefs module, in this case) hit E0514 against the headers package:
crate core compiled by rustc 1.98.1 (48a229cea 2026-09-01) (Arch Linux rust 1:1.98.1-2): /usr/lib/modules/6.18.53-1-lts/build/rust/libcore.rmeta = help: please recompile that crate using this compiler (rustc 1.98.1 (48a229cea 2026-09-01) (Arch Linux rust 1:1.98.1-1)) (consider running cargo clean first)
Both are 1.98.1 from the same commit, in two package releases: the linux-lts headers were built with the second while users still had the first. (Arch has since rebuilt its kernels.) The advice to recompile core and run cargo clean does not apply to a headers package, and the forum thread spent several posts on repository settings before the cause was clear:
https://bbs.archlinux.org/viewtopic.php?id=314993
The check in this patch compares rustc --version, which includes the distribution's description, so it fires in exactly this case. I rebased it onto current mainline (the only conflict is the pahole check added since; I put the Rust check after the C one) and tried it the other way round, with the Arch 7.2.8.arch1-1 headers (now in the Arch Linux Archive) and the newer rustc:
warning: the Rust compiler differs from the one used to build the kernel
The kernel was built by: rustc 1.98.1 (48a229cea 2026-09-01) (Arch Linux rust 1:1.98.1-1)
You are using: rustc 1.98.1 (48a229cea 2026-09-01) (Arch Linux rust 1:1.98.1-2)
RUSTC [M] rust_oot.o error[E0514]: found crate core compiled by an incompatible version of rustc
With a matching rustc it prints nothing. If you would like to take it now, I can send the rebased version.
Thanks,
Matthias
Miguel Ojeda
maintainerPATCH v2 6/6 docs: rust: include other expressions in conditional compilation section
In reply to Miguel OjedaExpand the conditional compilation section to explain how to support other expressions, such as testing whether RUSTC_VERSION is at least a given version, which requires a numerical comparison that Rust's cfg predicates do not support (yet?).
--- Documentation/rust/general-information.rst | 8 ++++++++ 1 file changed, 8 insertions(+)
Documentation/rust/general-information.rst +8 -0
@@ -151,3 +151,11 @@ configuration: #[cfg(CONFIG_X="y")] // Enabled as a built-in (`y`) #[cfg(CONFIG_X="m")] // Enabled as a module (`m`) #[cfg(not(CONFIG_X))] // Disabled + +For other predicates that Rust's ``cfg`` does not support, e.g. expressions with +numerical comparisons, one may define a new Kconfig symbol: + +.. code-block:: kconfig + + config RUSTC_VERSION_MIN_107900 + def_bool y if RUSTC_VERSION >= 107900
Signature · 1 line
2.46.0
Quoted 32 lines · Miguel Ojeda
This series mainly adds support for
CONFIG_RUSTC_VERSION(which is needed for other upcoming series) as well as support for rebuilding the kernel when the Rust compiler version text changes, plus other secondary improvements.v1: https://lore.kernel.org/rust-for-linux/[email protected]/
v2:- Dropped patch #2 "kbuild: rust: make command for
RUSTC_VERSION_TEXTcloser to theCCone" (Masahiro, Björn).In other words, now the
RUSTC_VERSION_TEXTcommand is kept as it was, withoutLC_ALL=1nor| head -n1.- Replaced
macroscrate dependency with a comment in the code thatfixdepwill find, since we can do it for that one, unlikecore(Masahiro, Nicolas).- Added patch (here #5) to add a warning when the Rust compiler used to build the kernel differs from the one used to build an out-of-tree module, like the C side does (Nicolas).
If the patch is not wanted, then it can be skipped without much loss, since anyway Rust will fail to compile in that case. However, it would be nice to have to prevent potentially unexpected situations and to clarify the errors that
rustcwould emit later. See the commit message for more details.- Rewrapped comment to stay under 80 lines (Nicolas).
- Picked up a couple tags that could more or less be reasonably taken given the changes to v2. Re-runs of tests welcome!
Quoted 10 lines
Miguel Ojeda (6):
kbuild: rust: addCONFIG_RUSTC_VERSION
kbuild: rust: re-runKconfigif the version text changes
kbuild: rust: rebuild if the version text changes
kbuild: rust: replace proc macros dependency oncore.owith the
version text
kbuild: rust: warn if the out-of-tree compiler differs from the kernel
one
docs: rust: include other expressions in conditional compilation
section
I re-ran the same tests as for v1.
Quoted 4 lines · Alice Ryhl
I re-ran the same tests as for v1.
Tested-by Alice Ryhl <[email protected]>
Thanks a lot!
Cheers,
Miguel
Quoted 52 lines · Miguel Ojeda
This series mainly adds support for
CONFIG_RUSTC_VERSION(which is needed for other upcoming series) as well as support for rebuilding the kernel when the Rust compiler version text changes, plus other secondary improvements.v1: https://lore.kernel.org/rust-for-linux/[email protected]/
v2:- Dropped patch #2 "kbuild: rust: make command for
RUSTC_VERSION_TEXTcloser to theCCone" (Masahiro, Björn).In other words, now the
RUSTC_VERSION_TEXTcommand is kept as it was, withoutLC_ALL=1nor| head -n1.- Replaced
macroscrate dependency with a comment in the code thatfixdepwill find, since we can do it for that one, unlikecore(Masahiro, Nicolas).- Added patch (here #5) to add a warning when the Rust compiler used to build the kernel differs from the one used to build an out-of-tree module, like the C side does (Nicolas).
If the patch is not wanted, then it can be skipped without much loss, since anyway Rust will fail to compile in that case. However, it would be nice to have to prevent potentially unexpected situations and to clarify the errors that
rustcwould emit later. See the commit message for more details.- Rewrapped comment to stay under 80 lines (Nicolas).
- Picked up a couple tags that could more or less be reasonably taken given the changes to v2. Re-runs of tests welcome!
Miguel Ojeda (6):
kbuild: rust: addCONFIG_RUSTC_VERSION
kbuild: rust: re-runKconfigif the version text changes
kbuild: rust: rebuild if the version text changes
kbuild: rust: replace proc macros dependency oncore.owith the
version text
kbuild: rust: warn if the out-of-tree compiler differs from the kernel
one
docs: rust: include other expressions in conditional compilation
sectionDocumentation/rust/general-information.rst | 8 +++++++ Makefile | 18 ++++++++++----- init/Kconfig | 11 ++++++++- rust/Makefile | 7 +++--- rust/macros/lib.rs | 4 ++++ scripts/rustc-version.sh | 26 ++++++++++++++++++++++ 6 files changed, 64 insertions(+), 10 deletions(-) create mode 100755 scripts/rustc-version.sh
Quoted 4 lines
base-commit:
a335e95914046c6bed45c0d17cabcd483682cf5e--
2.46.0
the whole series looks good to me. Thanks for the good explanations.
Kind regards,
Nicolas
Quoted 4 lines · Nicolas Schier
the whole series looks good to me. Thanks for the good explanations.
Reviewed-by Nicolas Schier <[email protected]>
Thanks a lot Nicolas, I appreciate the quick review and the kind words.
Cheers,
Miguel
Miguel Ojeda
AppliedQuoted 4 lines · Miguel Ojeda
This series mainly adds support for
CONFIG_RUSTC_VERSION(which is needed for other upcoming series) as well as support for rebuilding the kernel when the Rust compiler version text changes, plus other secondary improvements.
Applied to rust-next -- thanks everyone!
Just to be extra safe, I did not add patch #5 ("kbuild: rust: warn if the out-of-tree compiler differs from the kernel one") for the moment to give people more time to look at it, but we can add it later if nobody shouts.
Cheers,
Miguel