From: Khem Raj Date: Thu, 8 Sep 2022 18:42:42 +0000 (-0700) Subject: rust: Use variable to specify extra tools to install X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~2989 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=332df9ebbd75a1825ac99abf1311d2e692d398d7;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/rust/rust_1.63.0.bb b/meta/recipes-devtools/rust/rust_1.63.0.bb index 401d51041ee..1f9dbd3ccea 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