diff mbox series

[meta-lts-mixins,kirkstone/rust,08/11] libstd-rs: remove redundant CARGO_TARGET_DIR

Message ID 425dc5295a6a2555f415c8118eeb41afda3a5196.1762632742.git.scott.murray@konsulko.com
State New
Headers show
Series Update to Rust 1.90.0 | expand

Commit Message

Scott Murray Nov. 8, 2025, 8:15 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

The cargo class already sets this, so there's no need to set it again.

The value set by cargo.bbclass is actually ${B}/target, so update the
do_install task to match.

(From OE-Core rev: 3557f1c294531e7f8c34a2b0677e8c03f1b1be77)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(adapted from oe-core commit ec51c22e902c2556438f1323a71a5e47ef00681e)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 recipes-devtools/rust/libstd-rs_1.90.0.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/recipes-devtools/rust/libstd-rs_1.90.0.bb b/recipes-devtools/rust/libstd-rs_1.90.0.bb
index b39ec0a..8af93be 100644
--- a/recipes-devtools/rust/libstd-rs_1.90.0.bb
+++ b/recipes-devtools/rust/libstd-rs_1.90.0.bb
@@ -34,7 +34,6 @@  CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
 CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
 
 do_compile:prepend () {
-    export CARGO_TARGET_DIR="${B}"
     # For Rust 1.13.0 and newer
     export RUSTC_BOOTSTRAP="1"
 }
@@ -45,8 +44,8 @@  do_install () {
     # With the incremental build support added in 1.24, the libstd deps directory also includes dependency
     # files that get installed. Those are really only needed to incrementally rebuild the libstd library
     # itself and don't need to be installed.
-    rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d
-    cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
+    rm -f ${B}/target/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d
+    cp ${B}/target/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
 }
 
 BBCLASSEXTEND = "nativesdk"