From e2a1c8bc312c3a61a312fe286b4e36825a7ff787 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 8 Sep 2022 11:42:42 -0700 Subject: rust: Use variable to specify extra tools to install All architectures may not support same set of tools, therefore use a variable to specify this. E.g. on riscv32 rustfmt is not buildable right now. (From OE-Core rev: 332df9ebbd75a1825ac99abf1311d2e692d398d7) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- meta/recipes-devtools/rust/rust_1.63.0.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/rust/rust_1.63.0.bb b/meta/recipes-devtools/rust/rust_1.63.0.bb index 401d51041e..1f9dbd3cce 100644 --- a/meta/recipes-devtools/rust/rust_1.63.0.bb +++ b/meta/recipes-devtools/rust/rust_1.63.0.bb @@ -56,13 +56,15 @@ rust_do_install:class-nativesdk() { rm ${D}${libdir}/rustlib/manifest* } +EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt" +EXTRA_TOOLS:remove:riscv32 = "rustfmt" rust_do_install:class-target() { export PSEUDO_UNLOAD=1 rust_runx install unset PSEUDO_UNLOAD install -d ${D}${bindir} - for i in cargo-clippy clippy-driver rustfmt; do + for i in ${EXTRA_TOOLS}; do cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i done -- cgit v1.2.3-54-g00ecf