Closed hnj2 closed 3 years ago
Not sure if this is the right place or if rust-lang/rust is the place to put this issue?
I think you're running into the same thing as https://github.com/rust-lang/compiler-builtins/issues/347?
Essentially, compiler-builtins expects to be compiled with overflow-checks=false
and debug-assertions=false
which cargo -Z build-std
does not do ... You can add
[profile.dev.package.compiler_builtins]
overflow-checks = false
to your Cargo.toml
which gives a warning but still does the trick ...
Thank you very much!
Hi there,
I've encountered into the same issue and after googling reach this issue. The trick with
[profile.dev.package.compiler_builtins]
overflow-checks = false
works for me, but I think it is a build-std
's job to pass right flags to a rustc invocation.
Please correct me if I'm wrong.
With
-Z build-std
andlto = true
, the linker can't link tocore::panicking::panic
.The Issue might have to do with the fact that neither the
binutils-arm-none-eabi
toolchain norllvm-objdump
can read the generatedlibcore-***.rlib
file:Steps to Repoduce
src/main.rs
Cargo.toml
With
build-std
Without
build-std
:Without
tlo = true
:Version: