Auto merge of #36874 - japaric:thumbs, r=alexcrichton
add Thumbs to the compiler
this commit adds 4 new target definitions to the compiler for easier
cross compilation to ARM Cortex-M devices.
- `thumbv6m-none-eabi`
- For the Cortex-M0, Cortex-M0+ and Cortex-M1
- This architecture doesn't have hardware support (instructions) for
atomics. Hence, the `Atomic*` structs are not available for this
target.
- `thumbv7m-none-eabi`
- For the Cortex-M3
- `thumbv7em-none-eabi`
- For the FPU-less variants of the Cortex-M4 and Cortex-M7
- On this target, all the floating point operations will be lowered
software routines (intrinsics)
- `thumbv7em-none-eabihf`
- For the variants of the Cortex-M4 and Cortex-M7 that do have a FPU.
- On this target, all the floating point operations will be lowered
to hardware instructions
No binary releases of standard crates, like `core`, are planned for
these targets because Cargo, in the future, will compile e.g. the `core`
crate on the fly as part of the `cargo build` process. In the meantime,
you'll have to compile the `core` crate yourself. [Xargo] is the easiest
way to do that as in handles the compilation of `core` automatically and
can be used just like Cargo: `xargo build --target thumbv6m-none-eabi`
is all that's needed.
[Xargo]: https://crates.io/crates/xargo
---
cc @brson @alexcrichton
This commit is contained in:
commit
a5dac7a2af
60 changed files with 291 additions and 65 deletions
5
src/test/run-make/target-without-atomics/Makefile
Normal file
5
src/test/run-make/target-without-atomics/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-include ../tools.mk
|
||||
|
||||
# The target used below doesn't support atomic operations. Verify that's the case
|
||||
all:
|
||||
$(RUSTC) --print cfg --target thumbv6m-none-eabi | grep -qv target_has_atomic
|
||||
Loading…
Add table
Add a link
Reference in a new issue