diff options
| author | Pedro Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com> | 2025-01-29 11:33:24 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-01 13:20:45 +0000 |
| commit | 1e118362873f532d54983b191a3bf2ecff2a6958 (patch) | |
| tree | 2c8b127110d8fe5d3fc10dd10314ef1e483d8a6b | |
| parent | 0a3a771c237e6d78ff4ef46558a4e30c02aec358 (diff) | |
| download | poky-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.bbclass | 2 |
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" | |||
| 13 | FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta" | 13 | FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta" |
| 14 | FILES:${PN}-dbg += "${rustlibdir}/.debug" | 14 | FILES:${PN}-dbg += "${rustlibdir}/.debug" |
| 15 | 15 | ||
| 16 | RUSTLIB = "-L ${STAGING_DIR_HOST}${rustlibdir}" | 16 | RUSTLIB ?= "-L ${STAGING_DIR_HOST}${rustlibdir}" |
| 17 | RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}" | 17 | RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}" |
| 18 | RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}" | 18 | RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}" |
| 19 | RUSTLIB_DEP ??= "libstd-rs" | 19 | RUSTLIB_DEP ??= "libstd-rs" |
