Ross Burton <[email protected]> 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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246533): 
https://lists.openembedded.org/g/openembedded-core/message/246533
Mute This Topic: https://lists.openembedded.org/mt/120596993/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to