rust: Generate per recipe target configuration files

Instead of generating target configuration files centrally and often getting
it wrong, or having trouble finding the right set, generate them dynamically
from the bbclass into WORKDIR per recipe.

(From OE-Core rev: 9160e4a37561d8ac882057450a818621bec13bed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-08-05 13:15:31 +01:00
parent 9a093d0348
commit b1d8d2a3bf
8 changed files with 26 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
inherit python3native
inherit rust-target-config
# Common variables used by all Rust builds
export rustlibdir = "${libdir}/rust"
@@ -10,7 +11,6 @@ RUSTLIB = "-L ${STAGING_LIBDIR}/rust"
RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}"
RUSTLIB_DEP ?= "libstd-rs"
export RUST_TARGET_PATH = "${STAGING_LIBDIR_NATIVE}/rustlib"
RUST_PANIC_STRATEGY ?= "unwind"
# Native builds are not effected by TCLIBC. Without this, rust-native