My previous attempt at cleaning up this recipe[1] moved cargo-c specific
flags to CARGO_BUILD_FLAGS, which meant that they were passed to cargo
if that was also called directly (e.g. via ptest-cargo.bbclass).
Avoid this by using a new varibale CARGO_C_BUILD_FLAGS for cargo-c flags.
[1] oe-core 90792837769 ("classes/cargo-c: pass flags via CARGO_BUILD_FLAGS")
Signed-off-by: Ross Burton <[email protected]>
---
meta/classes-recipe/cargo_c.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes-recipe/cargo_c.bbclass
b/meta/classes-recipe/cargo_c.bbclass
index cd486b20067..ee6efaf0f9b 100644
--- a/meta/classes-recipe/cargo_c.bbclass
+++ b/meta/classes-recipe/cargo_c.bbclass
@@ -16,7 +16,7 @@ BASEDEPENDS:append = " cargo-c-native"
B = "${WORKDIR}/build"
-CARGO_BUILD_FLAGS += "\
+CARGO_C_BUILD_FLAGS = "\
--destdir ${D} \
--prefix ${prefix} \
--libdir ${libdir} \
@@ -28,13 +28,13 @@ cargo_c_do_compile() {
oe_cargo_fix_env
export RUSTFLAGS="${RUSTFLAGS}"
bbnote "Using rust targets from ${RUST_TARGET_PATH}"
- cargo-cbuild cbuild ${CARGO_BUILD_FLAGS}
+ cargo-cbuild cbuild ${CARGO_BUILD_FLAGS} ${CARGO_C_BUILD_FLAGS}
}
cargo_c_do_install() {
oe_cargo_fix_env
export RUSTFLAGS="${RUSTFLAGS}"
- cargo-cinstall cinstall ${CARGO_BUILD_FLAGS}
+ cargo-cinstall cinstall ${CARGO_BUILD_FLAGS} ${CARGO_C_BUILD_FLAGS}
}
EXPORT_FUNCTIONS do_compile do_install
--
2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246771):
https://lists.openembedded.org/g/openembedded-core/message/246771
Mute This Topic: https://lists.openembedded.org/mt/121473524/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-