diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-09-08 11:42:42 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-09 14:09:01 +0100 |
commit | e2a1c8bc312c3a61a312fe286b4e36825a7ff787 (patch) | |
tree | 387902849605a6a540d70a60dbcc613b628bfdef | |
parent | b064a9a51706325b9480b4fd7da2f3140d351c05 (diff) | |
download | poky-e2a1c8bc312c3a61a312fe286b4e36825a7ff787.tar.gz |
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 <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/rust/rust_1.63.0.bb | 4 |
1 files changed, 3 insertions, 1 deletions
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() { | |||
56 | rm ${D}${libdir}/rustlib/manifest* | 56 | rm ${D}${libdir}/rustlib/manifest* |
57 | } | 57 | } |
58 | 58 | ||
59 | EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt" | ||
60 | EXTRA_TOOLS:remove:riscv32 = "rustfmt" | ||
59 | rust_do_install:class-target() { | 61 | rust_do_install:class-target() { |
60 | export PSEUDO_UNLOAD=1 | 62 | export PSEUDO_UNLOAD=1 |
61 | rust_runx install | 63 | rust_runx install |
62 | unset PSEUDO_UNLOAD | 64 | unset PSEUDO_UNLOAD |
63 | 65 | ||
64 | install -d ${D}${bindir} | 66 | install -d ${D}${bindir} |
65 | for i in cargo-clippy clippy-driver rustfmt; do | 67 | for i in ${EXTRA_TOOLS}; do |
66 | cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} | 68 | cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} |
67 | chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i | 69 | chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i |
68 | done | 70 | done |