]>
Commit | Line | Data |
---|---|---|
dfeec247 XL |
1 | // Generic ARMv7-A target for bare-metal code - floating point enabled (assumes |
2 | // FPU is present and emits FPU instructions) | |
3 | // | |
4 | // This is basically the `armv7-unknown-linux-gnueabihf` target with some | |
5 | // changes (list in `armv7a_none_eabi.rs`) to bring it closer to the bare-metal | |
6 | // `thumb` & `aarch64` targets. | |
7 | ||
f9f354fc | 8 | use super::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel, Target, TargetOptions}; |
dfeec247 | 9 | |
29967ef6 | 10 | pub fn target() -> Target { |
dfeec247 | 11 | let opts = TargetOptions { |
29967ef6 XL |
12 | vendor: String::new(), |
13 | linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), | |
dfeec247 XL |
14 | linker: Some("rust-lld".to_owned()), |
15 | features: "+v7,+vfp3,-d32,+thumb2,-neon,+strict-align".to_string(), | |
16 | executables: true, | |
f9f354fc | 17 | relocation_model: RelocModel::Static, |
dfeec247 XL |
18 | disable_redzone: true, |
19 | max_atomic_width: Some(64), | |
20 | panic_strategy: PanicStrategy::Abort, | |
f035d41b | 21 | unsupported_abis: super::arm_base::unsupported_abis(), |
dfeec247 XL |
22 | emit_debug_gdb_scripts: false, |
23 | ..Default::default() | |
24 | }; | |
29967ef6 | 25 | Target { |
dfeec247 | 26 | llvm_target: "armv7a-none-eabihf".to_string(), |
29967ef6 | 27 | pointer_width: 32, |
dfeec247 XL |
28 | data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), |
29 | arch: "arm".to_string(), | |
dfeec247 | 30 | options: opts, |
29967ef6 | 31 | } |
dfeec247 | 32 | } |