diff mbox series

[meta-lts-mixins,wrynose/rust,10/19] classes/cargo_c: use CARGO_C_BUILD_FLAGS for cargo-c flags

Message ID e4402ede814e4be05e0b0bf0275edc74f3b3b6c1.1794870526.git.scott.murray@konsulko.com
State New
Headers show
Series Update to 1.99.1 | expand

Commit Message

Scott Murray Nov. 16, 2026, 11:12 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

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 <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(adapted from oe-core commit 7f5647a1b494e5b596b6699afe5e2550381df2ec)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 classes-recipe/cargo_c.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/classes-recipe/cargo_c.bbclass b/classes-recipe/cargo_c.bbclass
index cd486b2..ee6efaf 100644
--- a/classes-recipe/cargo_c.bbclass
+++ b/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