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 <[email protected]>
---
 meta/classes-recipe/cargo.bbclass | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/meta/classes-recipe/cargo.bbclass 
b/meta/classes-recipe/cargo.bbclass
index 628dbc98f18..586071988a9 100644
--- a/meta/classes-recipe/cargo.bbclass
+++ b/meta/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
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#242789): 
https://lists.openembedded.org/g/openembedded-core/message/242789
Mute This Topic: https://lists.openembedded.org/mt/120596994/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to