[3/4] cargo: pass PACKAGECONFIG_CONFARGS to cargo build

Message ID 20220606132653.60232-4-brgl@bgdev.pl
State New
Headers show
Series cargo: improve the build process and add a new recipe | expand

Commit Message

Bartosz Golaszewski June 6, 2022, 1:26 p.m. UTC
In order to allow rust packages to define PACKAGECONFIG options, append
the contents of PACKAGECONFIG_CONFARGS to the build command.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
 meta/classes/cargo.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/cargo.bbclass b/meta/classes/cargo.bbclass
index 7cfd4a2666..2a62fda4a3 100644
--- a/meta/classes/cargo.bbclass
+++ b/meta/classes/cargo.bbclass
@@ -44,7 +44,7 @@  oe_cargo_build () {
 	bbnote "cargo = $(which ${CARGO})"
 	bbnote "rustc = $(which ${RUSTC})"
 	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+)"