summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/libstd-rs_1.86.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rust/libstd-rs_1.86.0.bb')
-rw-r--r--meta/recipes-devtools/rust/libstd-rs_1.86.0.bb52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/libstd-rs_1.86.0.bb b/meta/recipes-devtools/rust/libstd-rs_1.86.0.bb
new file mode 100644
index 0000000000..b39ec0ab39
--- /dev/null
+++ b/meta/recipes-devtools/rust/libstd-rs_1.86.0.bb
@@ -0,0 +1,52 @@
1SUMMARY = "Rust standard libaries"
2HOMEPAGE = "http://www.rust-lang.org"
3SECTION = "devel"
4LICENSE = "(MIT | Apache-2.0) & Unicode-3.0"
5LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=11a3899825f4376896e438c8c753f8dc"
6
7require rust-source.inc
8
9# The dummy crate named `sysroot` represents the standard library target.
10#
11# See fd4c81f4c19e ("Add a `sysroot` crate to represent the standard library crates")
12# https://github.com/rust-lang/rust/pull/108865/
13S = "${RUSTSRC}/library/sysroot"
14
15RUSTLIB_DEP = ""
16inherit cargo
17
18CVE_PRODUCT = "rust"
19
20DEPENDS:append:libc-musl = " libunwind"
21# rv32 does not have libunwind ported yet
22DEPENDS:remove:riscv32 = "libunwind"
23DEPENDS:remove:riscv64 = "libunwind"
24
25# Embed bitcode in order to allow compiling both with and without LTO
26RUSTFLAGS += "-Cembed-bitcode=yes"
27# Ensure that user code can't access the dependencies of the standard library
28RUSTFLAGS += "-Zforce-unstable-if-unmarked"
29# Needed so cargo can find libbacktrace
30RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
31
32CARGO_FEATURES ?= "panic-unwind backtrace"
33CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
34CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
35
36do_compile:prepend () {
37 export CARGO_TARGET_DIR="${B}"
38 # For Rust 1.13.0 and newer
39 export RUSTC_BOOTSTRAP="1"
40}
41
42do_install () {
43 mkdir -p ${D}${rustlibdir}
44
45 # With the incremental build support added in 1.24, the libstd deps directory also includes dependency
46 # files that get installed. Those are really only needed to incrementally rebuild the libstd library
47 # itself and don't need to be installed.
48 rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d
49 cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
50}
51
52BBCLASSEXTEND = "nativesdk"