Skip to contentSkip to conversation

cargo: pass PACKAGECONFIG_CONFARGS to cargo build

PATCH Superseded [email protected] 1 participant 1 message Mar 19, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cargo: pass PACKAGECONFIG_CONFARGS to cargo build

From: Jean-Pierre Geslin <[email protected]>

In order to allow rust packages to define PACKAGECONFIG options, append the contents of PACKAGECONFIG_CONFARGS to the build command. This patch was already submitted by Bartosz Golaszewski on older version but was never merged. It will be really usefull for Rust recipes.

---
 meta/classes-recipe/cargo.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/cargo.bbclass +1 -1
index 76a39668c7..5dea260ba7 100644
@@ -48,7 +48,7 @@ oe_cargo_build () {
 	bbnote "Using rust targets from ${RUST_TARGET_PATH}"
 	bbnote "cargo = $(which ${CARGO})"
 	bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
-	"${CARGO}" build ${CARGO_BUILD_FLAGS} "$@"
+	"${CARGO}" build ${CARGO_BUILD_FLAGS} "${PACKAGECONFIG_CONFARGS}" "$@"
 }
 
 do_compile[progress] = "outof:\s+(\d+)/(\d+)"