Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
To: Ross Burton <Ross.Burton@arm.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH 8/9] classes/cargo-c: pass flags via CARGO_BUILD_FLAGS
Date: Wed, 23 Sep 2026 19:17:52 +0200	[thread overview]
Message-ID: <lyjyobsx8f.fsf@ensc-pc.intern.sigma-chemnitz.de> (raw)
In-Reply-To: <9921B090-ECA9-47CB-B05A-E32EF3925FB1@arm.com> (Ross Burton's message of "Wed, 23 Sep 2026 16:55:33 +0000")

Ross Burton <Ross.Burton@arm.com> writes:

>> Most/all of these flags are not supported by cargo and will break
>> recipes which use it directly (e.g. by inheriting the ptest-cargo
>> class):
>> 
>> | ERROR: ... do_compile_ptest_cargo: Unable to compile test with cargo, '.../cargo build ... --destdir ...' failed
>> 
>> It would be better to define and use a dedicated variable
>> (e.g. CARGO_C_BUILD_FLAGS).
>
> Ah. Is there a recipe in a public layer that can be used to demonstrate this?

not that I am aware of; I find only one public user of cargo_c:
rust-c-lib-example in meta-selftest/recipes-devtools/rust

But doing

| --- a/meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb
| +++ b/meta-selftest/recipes-devtools/rust/rust-c-lib-example_git.bb
| @@ -10,5 +10,6 @@ SRC_URI = " \
|  SRCREV = "fc53c457f69aa5221ec1f8619a007e8150db5e60"
|  
|  inherit cargo_c
| +inherit ptest-cargo
|  
|  require ${BPN}-crates.inc

shows the problem.


My usecase (with non-public sources):  rust project is

| .
| |- Cargo.toml
| |- src/
| |  |- lib.rs
| |- examples/
| |- project-c
|    |- Cargo.toml

C dylib is built by

| cargo cbuild --package project-c ...

while examples (shipped as ptest) require

| cargo build --examples



Enrico


  reply	other threads:[~2026-09-23 17:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 16:57 [PATCH 1/9] classes/cargo_common: move PKG_CONFIG_ALLOW_CROSS export to oe_cargo_fix_env Ross Burton
2026-08-04 16:57 ` [PATCH 2/9] classes/rust: remove unused variables Ross Burton
2026-08-04 16:57 ` [PATCH 3/9] classes/cargo: move general assignments to cargo_common.bbclass Ross Burton
2026-08-04 16:57 ` [PATCH 4/9] classes/cargo: consolidate dependencies Ross Burton
2026-08-05  9:02   ` [OE-core] " Mathieu Dubois-Briand
2026-08-04 16:57 ` [PATCH 5/9] rust: clean up dependencies Ross Burton
2026-08-04 16:58 ` [PATCH 6/9] classes/cargo_c: inherit cargo_common Ross Burton
2026-08-04 16:58 ` [PATCH 7/9] classes/cargo-c: remove CARGO_C_BUILD/CARGO_C_INSTALL variables Ross Burton
2026-08-04 16:58 ` [PATCH 8/9] classes/cargo-c: pass flags via CARGO_BUILD_FLAGS Ross Burton
2026-09-17 16:31   ` [OE-core] " Enrico Scholz
2026-09-23 16:55     ` Ross Burton
2026-09-23 17:17       ` Enrico Scholz [this message]
2026-08-04 16:58 ` [PATCH 9/9] classes/cargo: merge oe_cargo_build into cargo_do_compile Ross Burton

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=lyjyobsx8f.fsf@ensc-pc.intern.sigma-chemnitz.de \
    --to=enrico.scholz@sigma-chemnitz.de \
    --cc=Ross.Burton@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox