diff mbox series

[5/9] rust: clean up dependencies

Message ID 20260804165803.598030-5-ross.burton@arm.com
State Under Review
Headers show
Series [1/9] classes/cargo_common: move PKG_CONFIG_ALLOW_CROSS export to oe_cargo_fix_env | expand

Commit Message

Ross Burton Aug. 4, 2026, 4:57 p.m. UTC
The rust recipe inherits cargo_common which now depends on rust-native
and cargo-native, so we can just remove those dependencies in the native
case instead of having to handle target/nativesdk.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-devtools/rust/rust_1.96.1.bb | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/rust_1.96.1.bb b/meta/recipes-devtools/rust/rust_1.96.1.bb
index f8f47b04142..7d1761c562c 100644
--- a/meta/recipes-devtools/rust/rust_1.96.1.bb
+++ b/meta/recipes-devtools/rust/rust_1.96.1.bb
@@ -12,21 +12,19 @@  inherit rust
 inherit cargo_common
 
 DEPENDS += "llvm"
+
 # native rust uses cargo/rustc from binary snapshots to bootstrap
 # but everything else should use our native builds
-DEPENDS:append:class-target = " cargo-native rust-native"
-DEPENDS:append:class-nativesdk = " cargo-native rust-native"
+DEPENDS:remove:class-native = "cargo-native"
+INHIBIT_DEFAULT_RUST_DEPS:class-native = "1"
+
+PROVIDES:class-native = "virtual/${TARGET_PREFIX}rust"
 
 RDEPENDS:${PN}:append:class-target = " gcc g++ binutils"
 
 PACKAGECONFIG ??= "llvm-shared"
 PACKAGECONFIG[llvm-shared] = ",,,"
 
-# Otherwise we'll depend on what we provide
-INHIBIT_DEFAULT_RUST_DEPS:class-native = "1"
-# We don't need to depend on gcc-native because yocto assumes it exists
-PROVIDES:class-native = "virtual/${TARGET_PREFIX}rust"
-
 S = "${RUSTSRC}"
 # Separate build directory from the shared source tree so that multiple
 # variants (target, native, nativesdk) don't conflict in the source dir.