kbuild: rust: remove now-unneeded `rusttest` custom sysroot handling
Subsystems (3)
Miguel Ojeda
maintainerPATCH 1/1 kbuild: rust: remove now-unneeded `rusttest` custom sysroot handling
Since we dropped our custom alloc in commit 9d0441bab775 ("rust: alloc:
remove our fork of the alloc crate"), there is no need anymore to keep the custom sysroot hack.
Thus delete it, which makes the target way simpler and faster too.
This also means we are not using Cargo for anything at the moment, and that no download is required anymore, so update the main Makefile and the documentation accordingly.
--- Documentation/rust/quick-start.rst | 14 ------ Documentation/rust/testing.rst | 5 +-- Makefile | 3 +- rust/Makefile | 70 ++++-------------------------- 4 files changed, 11 insertions(+), 81 deletions(-)
Documentation/rust/quick-start.rst +0 -14
@@ -164,20 +164,6 @@ can be installed manually:: The standalone installers also come with ``clippy``. -cargo -***** - -``cargo`` is the Rust native build system. It is currently required to run -the tests since it is used to build a custom standard library that contains -the facilities provided by the custom ``alloc`` in the kernel. The tests can -be run using the ``rusttest`` Make target. - -If ``rustup`` is being used, all the profiles already install the tool, -thus nothing needs to be done. - -The standalone installers also come with ``cargo``. - - rustdoc *******
Documentation/rust/testing.rst +2 -3
@@ -131,9 +131,8 @@ Additionally, there are the ``#[test]`` tests. These can be run using the make LLVM=1 rusttest -This requires the kernel ``.config`` and downloads external repositories. It -runs the ``#[test]`` tests on the host (currently) and thus is fairly limited in -what these tests can test. +This requires the kernel ``.config``. It runs the ``#[test]`` tests on the host +(currently) and thus is fairly limited in what these tests can test. The Kselftests --------------
Makefile +1 -2
@@ -507,7 +507,6 @@ RUSTDOC = rustdoc RUSTFMT = rustfmt CLIPPY_DRIVER = clippy-driver BINDGEN = bindgen -CARGO = cargo PAHOLE = pahole RESOLVE_BTFIDS = $(objtree)/tools/bpf/resolve_btfids/resolve_btfids LEX = flex
@@ -601,7 +600,7 @@ endif export RUSTC_BOOTSTRAP := 1 export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG -export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN CARGO +export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN export HOSTRUSTC KBUILD_HOSTRUSTFLAGS export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
rust/Makefile +8 -62
121 lines not on this page · raw message
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
Signature · 1 line
2.45.1
Miguel Ojeda
AppliedQuoted 5 lines · Miguel Ojeda
Since we dropped our custom
allocin commit9d0441bab775("rust: alloc:
remove our fork of thealloccrate"), there is no need anymore to keep the custom sysroot hack.
Quoted 7 lines
Thus delete it, which makes the target way simpler and faster too.
This also means we are not using Cargo for anything at the moment, and that no download is required anymore, so update the main
Makefileand the documentation accordingly.Signed-off-by Miguel Ojeda <[email protected]>
Applied to rust-next.
Cheers,
Miguel