summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com>2025-01-29 11:33:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-01 13:20:45 +0000
commit1e118362873f532d54983b191a3bf2ecff2a6958 (patch)
tree2c8b127110d8fe5d3fc10dd10314ef1e483d8a6b
parent0a3a771c237e6d78ff4ef46558a4e30c02aec358 (diff)
downloadpoky-1e118362873f532d54983b191a3bf2ecff2a6958.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: 6eeb832f73ffb48f5f05dc47191f60e4599e640f) Signed-off-by: Pedro Silva Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-recipe/rust-common.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-recipe/rust-common.bbclass b/meta/classes-recipe/rust-common.bbclass
index baa3869c47..31331c7a26 100644
--- a/meta/classes-recipe/rust-common.bbclass
+++ b/meta/classes-recipe/rust-common.bbclass
@@ -13,7 +13,7 @@ FILES:${PN} += "${rustlibdir}/*.so"
13FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta" 13FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta"
14FILES:${PN}-dbg += "${rustlibdir}/.debug" 14FILES:${PN}-dbg += "${rustlibdir}/.debug"
15 15
16RUSTLIB = "-L ${STAGING_DIR_HOST}${rustlibdir}" 16RUSTLIB ?= "-L ${STAGING_DIR_HOST}${rustlibdir}"
17RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}" 17RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}"
18RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}" 18RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}"
19RUSTLIB_DEP ??= "libstd-rs" 19RUSTLIB_DEP ??= "libstd-rs"