Closed MathiasKoch closed 4 years ago
I have also tried using
RUSTFLAGS="--sysroot=/home/mathias/git/blackbird/other/factbird-rs/target/sysroot" cargo build
My guess is that setting the RUSTFLAGS environment variables overwrites the default values set in .cargo/config
, so that no linker script is used. If it occurs with bare cargo
, there is nothing that cargo-xbuild
can do to fix this.
My problem is, that i need the sysroot alloc and compiler_builtins for my project.
If you're using the built-in thumbv7em-none-eabihf
, all sysroot libraries should be provided by rustup/cargo. For using alloc
, just add extern crate alloc;
to your main.rs
and use the normal cargo build
for building.
The cargo-xbuild
crate is only needed when compiling for a custom target, since there are no precompiled versions of the sysroot crates then.
Hi.
I am trying to use cargo xbuild to build for target "thumbv7em-none-eabihf".
When i am using
cargo build
, everything correctly links, resulting inBut, building the exact same with
cargo xbuild
results inI have also tried using
RUSTFLAGS="--sysroot=/home/mathias/git/blackbird/other/factbird-rs/target/sysroot" cargo build
Which also results in the same wrongly linked file.
My problem is, that i need the sysroot alloc and compiler_builtins for my project.
I have attached an
cargo xbuild --verbose
after acargo clean
here, but there is no errors.. :My
.cargo/config
is:A copy of my repo can be found here: https://github.com/smilykoch/factbird_rs
I am not really sure how to continue on this, so any help is welcomed!