summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com>2025-02-06 10:12:21 +0000
committerSteve Sakoman <steve@sakoman.com>2025-02-15 06:04:44 -0800
commit70b5e37d0df910ba0c0e90d4ae04f6390b8a925d (patch)
treeeea338bf16ad87e726a00b3f92314eea75f49b6b
parent70349820ed3af4295823a73b5f74fb56f345b8ad (diff)
downloadpoky-70b5e37d0df910ba0c0e90d4ae04f6390b8a925d.tar.gz
rust-common.bbclass: soft assignment for RUSTLIB path
As a user i want to override `RUSTLIB` path on a bbclass, lets call it `XYZ.bbclass`. If a certain recipe inherits `cargo.bbclass` and `XYZ.bbclass` the value of `RUSTLIB` is dependent on the order of the inherit. If `cargo.bbclass` is inherit before `XYZ.bbclass` this will reflect the desired value of `RUSTLIB`, on the oposite, if the `XYZ.bbclass` is inherit before `cargo.bbclass` then the `RUSTLIB` defined on `rust-common.bbclass` will prevail. Changed definition of `RUSTLIB` to soft assignment to make it overridable. (From OE-Core rev: d8ccc3ad338a8020c998566249af2019baaa6e44) Signed-off-by: Pedro Silva Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> (cherry picked from commit 6eeb832f73ffb48f5f05dc47191f60e4599e640f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/rust-common.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/rust-common.bbclass b/meta/classes/rust-common.bbclass
index cb811ac5da..1c34d4c8b9 100644
--- a/meta/classes/rust-common.bbclass
+++ b/meta/classes/rust-common.bbclass
@@ -6,7 +6,7 @@ FILES:${PN} += "${rustlibdir}/*.so"
6FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta" 6FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta"
7FILES:${PN}-dbg += "${rustlibdir}/.debug" 7FILES:${PN}-dbg += "${rustlibdir}/.debug"
8 8
9RUSTLIB = "-L ${STAGING_LIBDIR}/rust" 9RUSTLIB ?= "-L ${STAGING_LIBDIR}/rust"
10RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" 10RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
11RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}" 11RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}"
12RUSTLIB_DEP ?= "libstd-rs" 12RUSTLIB_DEP ?= "libstd-rs"