rust: Install target.json for target rustc

As part of the merging builds, installation of target.json was lost
causing `rustc` to fail on startup with:

  error: Error loading target specification: Could not find specification for target "aarch64-poky-linux-gnu". Run `rustc --print target-list` for a list of built-in targets

We know the full target specification, so just install it directly
rather than using the glob approach from previously.

Fixes: b9b0cd99cdc7 ("rust: Enable nativesdk and target builds + replace rust-tools-cross-canadian")
(From OE-Core rev: b187185ceecf1c852b1fdc47451d157a41962d69)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alex Kiernan
2022-12-16 12:06:31 +00:00
committed by Richard Purdie
parent 9eb2b0bb7a
commit e115fe5472

View File

@@ -68,6 +68,9 @@ rust_do_install:class-target() {
chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i
done
install -d ${D}${libdir}/rustlib/${RUST_HOST_SYS}
install -m 0644 ${WORKDIR}/rust-targets/${RUST_HOST_SYS}.json ${D}${libdir}/rustlib/${RUST_HOST_SYS}/target.json
chown root:root ${D}/ -R
rm ${D}${libdir}/rustlib/uninstall.sh
rm ${D}${libdir}/rustlib/install.log