summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/libstd-rs.inc
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2022-12-21 12:52:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-23 12:06:35 +0000
commit35528aff99478200ab22f921d16b7c85f106fd32 (patch)
treedbc05f129352920540f4fa167a13276801cf0057 /meta/recipes-devtools/rust/libstd-rs.inc
parent06763de40af8dd0c152bfb536f3d6e83e1c03000 (diff)
downloadpoky-35528aff99478200ab22f921d16b7c85f106fd32.tar.gz
libstd-rs: Merge .inc into .bb
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/libstd-rs.inc')
-rw-r--r--meta/recipes-devtools/rust/libstd-rs.inc40
1 files changed, 0 insertions, 40 deletions
diff --git a/meta/recipes-devtools/rust/libstd-rs.inc b/meta/recipes-devtools/rust/libstd-rs.inc
deleted file mode 100644
index 44cf683837..0000000000
--- a/meta/recipes-devtools/rust/libstd-rs.inc
+++ /dev/null
@@ -1,40 +0,0 @@
1SUMMARY = "Rust standard libaries"
2HOMEPAGE = "http://www.rust-lang.org"
3SECTION = "devel"
4LICENSE = "(MIT | Apache-2.0) & Unicode-TOU"
5LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=92289ed52a60b63ab715612ad2915603"
6
7RUSTLIB_DEP = ""
8inherit cargo
9
10DEPENDS:append:libc-musl = " libunwind"
11# rv32 does not have libunwind ported yet
12DEPENDS:remove:riscv32 = "libunwind"
13DEPENDS:remove:riscv64 = "libunwind"
14
15# Embed bitcode in order to allow compiling both with and without LTO
16RUSTFLAGS += "-Cembed-bitcode=yes"
17# Needed so cargo can find libbacktrace
18RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
19
20S = "${RUSTSRC}/src/libstd"
21
22CARGO_FEATURES ?= "panic-unwind backtrace"
23CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
24CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
25
26do_compile:prepend () {
27 export CARGO_TARGET_DIR="${B}"
28 # For Rust 1.13.0 and newer
29 export RUSTC_BOOTSTRAP="1"
30}
31
32do_install () {
33 mkdir -p ${D}${rustlibdir}
34
35 # With the incremental build support added in 1.24, the libstd deps directory also includes dependency
36 # files that get installed. Those are really only needed to incrementally rebuild the libstd library
37 # itself and don't need to be installed.
38 rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d
39 cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
40}