poky-contrib/meta/recipes-devtools/rust/libstd-rs_1.86.0.bb
Yash Shinde 2826f506a7 rust: Upgrade 1.85.1->1.86.0
- Added "pkgconfig-native" for native build to resolve openssl-sys crate
dependency on pkg-config.

- Disable ninja build which caused regression for bootstrap build.

- Add do_install:append() task to remove cargo bin from rust native builds.
This resolves the following conflict:

ERROR: libstd-rs-1.86.0-r0 do_prepare_recipe_sysroot: The file /usr/bin/cargo is
installed by both rust-native and cargo-native, aborting

- Update Unicode-3.0 license checksums.

- Some patches were causing rebase conflicts after the upgrade.
They are temporarily dropped. They will be included again
once the rust build issues are resolved.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
2025-04-29 08:06:51 -07:00

53 lines
1.7 KiB
BlitzBasic

SUMMARY = "Rust standard libaries"
HOMEPAGE = "http://www.rust-lang.org"
SECTION = "devel"
LICENSE = "(MIT | Apache-2.0) & Unicode-3.0"
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=9c0fae516fe8aaea2fb601db4800daf7"
require rust-source.inc
# The dummy crate named `sysroot` represents the standard library target.
#
# See fd4c81f4c19e ("Add a `sysroot` crate to represent the standard library crates")
# https://github.com/rust-lang/rust/pull/108865/
S = "${RUSTSRC}/library/sysroot"
RUSTLIB_DEP = ""
inherit cargo
CVE_PRODUCT = "rust"
DEPENDS:append:libc-musl = " libunwind"
# rv32 does not have libunwind ported yet
DEPENDS:remove:riscv32 = "libunwind"
DEPENDS:remove:riscv64 = "libunwind"
# Embed bitcode in order to allow compiling both with and without LTO
RUSTFLAGS += "-Cembed-bitcode=yes"
# Ensure that user code can't access the dependencies of the standard library
RUSTFLAGS += "-Zforce-unstable-if-unmarked"
# Needed so cargo can find libbacktrace
RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
do_compile:prepend () {
export CARGO_TARGET_DIR="${B}"
# For Rust 1.13.0 and newer
export RUSTC_BOOTSTRAP="1"
}
do_install () {
mkdir -p ${D}${rustlibdir}
# With the incremental build support added in 1.24, the libstd deps directory also includes dependency
# files that get installed. Those are really only needed to incrementally rebuild the libstd library
# itself and don't need to be installed.
rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d
cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
}
BBCLASSEXTEND = "nativesdk"