]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
rust: do not run separate build/install steps
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 31 Mar 2023 05:26:31 +0000 (07:26 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Apr 2023 10:56:32 +0000 (11:56 +0100)
Upstream does not actually use or test it this way; if the goal
is to install items, then install target should be executed directly.

In particular, in latest rust release building stage 2 items has regressed
altogether (incorrect dependencies between rust-analyze tool and the
libs it needs) and no one noticed.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/rust/rust_1.67.1.bb

index f4c6d9511dbc2a26e1540ff76646ba9252a4d168..eecb05ae02692d6db0071d1f28f409c7cabba355 100644 (file)
@@ -221,17 +221,6 @@ FILES:${PN} += "${libdir}/*.so"
 FILES:${PN}-dev = ""
 
 do_compile () {
-    rust_runx build --stage 2
-}
-
-do_compile:append:class-target () {
-    rust_runx build --stage 2 src/tools/clippy
-    rust_runx build --stage 2 src/tools/rustfmt
-}
-
-do_compile:append:class-nativesdk () {
-    rust_runx build --stage 2 src/tools/clippy
-    rust_runx build --stage 2 src/tools/rustfmt
 }
 
 ALLOW_EMPTY:${PN} = "1"
@@ -256,6 +245,8 @@ rust_do_install() {
 rust_do_install:class-nativesdk() {
     export PSEUDO_UNLOAD=1
     rust_runx install
+    rust_runx install clippy
+    rust_runx install rustfmt
     unset PSEUDO_UNLOAD
 
     install -d ${D}${bindir}
@@ -274,6 +265,8 @@ EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt"
 rust_do_install:class-target() {
     export PSEUDO_UNLOAD=1
     rust_runx install
+    rust_runx install clippy
+    rust_runx install rustfmt
     unset PSEUDO_UNLOAD
 
     install -d ${D}${bindir}