summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorPedro Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com>2025-02-06 10:07:24 +0000
committerSteve Sakoman <steve@sakoman.com>2025-02-12 06:25:37 -0800
commitd1f9cbae402f2e423d9ac31cb063de6f6e6c2b87 (patch)
tree0999e812dc95254d3bcfff1fb50511202d38f356 /meta/classes-recipe
parentc7e8807ddd2671956d9e1d15303e36dff9a22727 (diff)
downloadpoky-d1f9cbae402f2e423d9ac31cb063de6f6e6c2b87.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: b71da7dd831d768d829c74f6137152f2ca6141b0) 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>
Diffstat (limited to 'meta/classes-recipe')
-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 6940093e59..b4b70574a2 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"