diff options
Diffstat (limited to 'meta/recipes-devtools/rust/rust_1.63.0.bb')
| -rw-r--r-- | meta/recipes-devtools/rust/rust_1.63.0.bb | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust_1.63.0.bb b/meta/recipes-devtools/rust/rust_1.63.0.bb new file mode 100644 index 0000000000..3081cd5ef3 --- /dev/null +++ b/meta/recipes-devtools/rust/rust_1.63.0.bb | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | require rust-target.inc | ||
| 2 | require rust-source.inc | ||
| 3 | require rust-snapshot.inc | ||
| 4 | |||
| 5 | INSANE_SKIP:${PN}:class-native = "already-stripped" | ||
| 6 | FILES:${PN} += "${libdir}/rustlib" | ||
| 7 | FILES:${PN} += "${libdir}/*.so" | ||
| 8 | FILES:${PN}-dev = "" | ||
| 9 | |||
| 10 | do_compile () { | ||
| 11 | rust_runx build --stage 2 | ||
| 12 | } | ||
| 13 | |||
| 14 | do_compile:append:class-target () { | ||
| 15 | rust_runx build --stage 2 src/tools/clippy | ||
| 16 | rust_runx build --stage 2 src/tools/rustfmt | ||
| 17 | } | ||
| 18 | |||
| 19 | do_compile:append:class-nativesdk () { | ||
| 20 | rust_runx build --stage 2 src/tools/clippy | ||
| 21 | rust_runx build --stage 2 src/tools/rustfmt | ||
| 22 | } | ||
| 23 | |||
| 24 | ALLOW_EMPTY:${PN} = "1" | ||
| 25 | |||
| 26 | PACKAGES =+ "${PN}-tools-clippy ${PN}-tools-rustfmt" | ||
| 27 | FILES:${PN}-tools-clippy = "${bindir}/cargo-clippy ${bindir}/clippy-driver" | ||
| 28 | FILES:${PN}-tools-rustfmt = "${bindir}/rustfmt" | ||
| 29 | RDEPENDS:${PN}-tools-clippy = "${PN}" | ||
| 30 | RDEPENDS:${PN}-tools-rustfmt = "${PN}" | ||
| 31 | |||
| 32 | SUMMARY:${PN}-tools-clippy = "A collection of lints to catch common mistakes and improve your Rust code" | ||
| 33 | SUMMARY:${PN}-tools-rustfmt = "A tool for formatting Rust code according to style guidelines" | ||
| 34 | |||
| 35 | rust_do_install() { | ||
| 36 | rust_runx install | ||
| 37 | } | ||
| 38 | |||
| 39 | rust_do_install:class-nativesdk() { | ||
| 40 | export PSEUDO_UNLOAD=1 | ||
| 41 | rust_runx install | ||
| 42 | unset PSEUDO_UNLOAD | ||
| 43 | |||
| 44 | install -d ${D}${bindir} | ||
| 45 | for i in cargo-clippy clippy-driver rustfmt; do | ||
| 46 | cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} | ||
| 47 | chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i | ||
| 48 | done | ||
| 49 | |||
| 50 | chown root:root ${D}/ -R | ||
| 51 | rm ${D}${libdir}/rustlib/uninstall.sh | ||
| 52 | rm ${D}${libdir}/rustlib/install.log | ||
| 53 | rm ${D}${libdir}/rustlib/manifest* | ||
| 54 | } | ||
| 55 | |||
| 56 | rust_do_install:class-target() { | ||
| 57 | export PSEUDO_UNLOAD=1 | ||
| 58 | rust_runx install | ||
| 59 | unset PSEUDO_UNLOAD | ||
| 60 | |||
| 61 | install -d ${D}${bindir} | ||
| 62 | for i in cargo-clippy clippy-driver rustfmt; do | ||
| 63 | cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} | ||
| 64 | chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i | ||
| 65 | done | ||
| 66 | |||
| 67 | chown root:root ${D}/ -R | ||
| 68 | rm ${D}${libdir}/rustlib/uninstall.sh | ||
| 69 | rm ${D}${libdir}/rustlib/install.log | ||
| 70 | rm ${D}${libdir}/rustlib/manifest* | ||
| 71 | } | ||
| 72 | |||
| 73 | # see recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch | ||
| 74 | # we need to link with ssp_nonshared on musl to avoid "undefined reference to `__stack_chk_fail_local'" | ||
| 75 | # when building MACHINE=qemux86 for musl | ||
| 76 | WRAPPER_TARGET_EXTRALD:libc-musl = "-lssp_nonshared" | ||
| 77 | |||
| 78 | RUSTLIB_DEP:class-nativesdk = "" | ||
| 79 | |||
| 80 | # musl builds include libunwind.a | ||
| 81 | INSANE_SKIP:${PN} = "staticdev" | ||
| 82 | |||
