diff mbox series

[meta-lts-mixins,scarthgap/rust,25/37] classes/cargo: merge oe_cargo_build into cargo_do_compile

Message ID 4c195f6dd000231e5c7797cf0d9202b6339f861d.1789156653.git.scott.murray@konsulko.com
State New
Headers show
Series Update to 1.98.1 | expand

Commit Message

Scott Murray Sept. 11, 2026, 8:13 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

A layer of indirection between cargo_do_compile() and actually calling
cargo isn't needed, so merge oe_cargo_build into cargo_do_compile.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(adapted from oe-core commit a64ac03a6146555f1847cdf43e3f86d14f6e506d)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 classes-recipe/cargo.bbclass | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/classes-recipe/cargo.bbclass b/classes-recipe/cargo.bbclass
index 628dbc9..5860719 100644
--- a/classes-recipe/cargo.bbclass
+++ b/classes-recipe/cargo.bbclass
@@ -17,7 +17,8 @@  CARGO = "cargo"
 # Enable build separation
 B = "${WORKDIR}/build"
 
-oe_cargo_build () {
+do_compile[progress] = "outof:\s+(\d+)/(\d+)"
+cargo_do_compile () {
 	export RUSTFLAGS="${RUSTFLAGS}"
 	bbnote "Using rust targets from ${RUST_TARGET_PATH}"
 	bbnote "cargo = $(which ${CARGO})"
@@ -25,11 +26,6 @@  oe_cargo_build () {
 	"${CARGO}" build ${CARGO_BUILD_FLAGS} ${PACKAGECONFIG_CONFARGS} "$@"
 }
 
-do_compile[progress] = "outof:\s+(\d+)/(\d+)"
-cargo_do_compile () {
-	oe_cargo_build
-}
-
 cargo_do_install () {
 	local have_installed=false
 	for tgt in "${B}/target/${CARGO_TARGET_SUBDIR}/"*; do