From: martin.jansa@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Jean-Pierre Geslin <jarsoper@gmail.com>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Martin Jansa <martin.jansa@gmail.com>
Subject: [PATCH 2/2] cargo.bbclass: allow to avoid appending PACKAGECONFIG_CONFARGS
Date: Thu, 20 Mar 2025 17:55:17 +0100 [thread overview]
Message-ID: <20250320165517.129442-2-martin.jansa@gmail.com> (raw)
In-Reply-To: <20250320165517.129442-1-martin.jansa@gmail.com>
From: Martin Jansa <martin.jansa@gmail.com>
* some recipes might be using PACKAGECONFIG_CONFARGS as:
RUSTFLAGS:append = " ${PACKAGECONFIG_CONFARGS}"
and then it's difficult to prevent the same args being used
here for cargo call as well add intermedate variable
CARGO_BUILD_FLAGS_PACKAGECONFIG
which could be set to empty in the recipe to avoid that.
* alternatively we can just revert:
https://git.openembedded.org/openembedded-core/commit/?id=16745b20452de60ae2474433cc1a2fb1ed9f6a64
and let each recipe decide how it wants to use PACKAGECONFIG_CONFARGS
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-recipe/cargo.bbclass | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass
index 2dd28e95d3..63e550f5d0 100644
--- a/meta/classes-recipe/cargo.bbclass
+++ b/meta/classes-recipe/cargo.bbclass
@@ -43,12 +43,14 @@ CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manif
# change if CARGO_BUILD_FLAGS changes.
BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}"
CARGO_TARGET_SUBDIR = "${RUST_HOST_SYS}/${BUILD_DIR}"
+CARGO_BUILD_FLAGS_PACKAGECONFIG = ?= "${PACKAGECONFIG_CONFARGS}"
+CARGO_BUILD_FLAGS:append = " ${CARGO_BUILD_FLAGS_PACKAGECONFIG}"
oe_cargo_build () {
export RUSTFLAGS="${RUSTFLAGS}"
bbnote "Using rust targets from ${RUST_TARGET_PATH}"
bbnote "cargo = $(which ${CARGO})"
- bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} ${PACKAGECONFIG_CONFARGS} $@"
- "${CARGO}" build ${CARGO_BUILD_FLAGS} ${PACKAGECONFIG_CONFARGS} "$@"
+ bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
+ "${CARGO}" build ${CARGO_BUILD_FLAGS} "$@"
}
do_compile[progress] = "outof:\s+(\d+)/(\d+)"
next prev parent reply other threads:[~2025-03-20 16:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-20 16:55 [PATCH 1/2] cargo.bbclass: show PACKAGECONFIG_CONFARGS in bbnote martin.jansa
2025-03-20 16:55 ` martin.jansa [this message]
[not found] ` <182E912DEB60EF95.20788@lists.openembedded.org>
2025-03-20 16:59 ` [OE-core] [PATCH 2/2] cargo.bbclass: allow to avoid appending PACKAGECONFIG_CONFARGS Martin Jansa
2025-03-20 17:06 ` Richard Purdie
[not found] ` <182E91CCE4A2B275.19116@lists.openembedded.org>
2025-03-20 17:16 ` Richard Purdie
2025-03-20 17:36 ` Martin Jansa
2025-03-20 17:51 ` Jean-Pierre Geslin
2025-03-20 18:11 ` [OE-core] " Jean-Pierre Geslin
2025-03-24 18:55 ` Alexander Kanavin
2025-03-24 19:30 ` Martin Jansa
2025-03-24 22:29 ` Richard Purdie
2025-03-31 16:18 ` akuster808
2025-03-31 16:28 ` Alexander Kanavin
2025-05-16 15:07 ` Anton Antonov
2025-05-16 15:55 ` [OE-core] " Alexander Kanavin
2025-05-16 16:39 ` Anton Antonov
2025-05-16 17:19 ` [OE-core] " Alexander Kanavin
2025-05-16 17:43 ` Marko, Peter
2025-05-16 17:47 ` Anton Antonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250320165517.129442-2-martin.jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=jarsoper@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.