Closed cmeissl closed 1 year ago
Instead of parsing the sysroot out of CARGO_ENCODED_RUSTFLAGS
, would it work to split the CARGO_ENCODED_RUSTFLAGS
on 0x1f (the delimiter according to this) and pass all the strings as arguments to every rustc invocation?
Instead of parsing the sysroot out of
CARGO_ENCODED_RUSTFLAGS
, would it work to split theCARGO_ENCODED_RUSTFLAGS
on 0x1f (the delimiter according to this) and pass all the strings as arguments to every rustc invocation?
yes, that should work too. anyhow
seems to do exactly that. I will update this PR later today or tomorrow.
I removed the build dep to rustflags
and changed to code to just forward all flags.
Would be awesome to get that change released soon as this currently blocks some builds for me :)
Thanks!
This PR is now in the io-lifetimes 1.0.4 release.
This PR is now in the io-lifetimes 1.0.4 release.
Awesome, thanks! Can confirm this fixes my build when using the yocto
cargo.bbclass
.
Following anyhow's change and this documentation I'm planning to change this from using CARGO_RUSTC_WRAPPER
to using RUSTC_WRAPPER
.
If I understand correctly, CARGO_RUSTC_WRAPPER
wasn't ever set, and just the CARGO_ENCODED_RUSTFLAGS
part of this PR was what fixed the build for you, so this change shouldn't have any affect. But I wanted to ping this issue just as a heads up.
compiling rust programs in yocto uses a custom target triple with a custom sysroot not specifying the sysroot when executing rustc can lead to errors like "can't find crate for
std
" this patch forwards the sysroot for testing features