]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_target/src/spec/armv7a_none_eabihf.rs
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / armv7a_none_eabihf.rs
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
8 use super::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel, Target, TargetOptions};
9
10 pub fn target() -> Target {
11 let opts = TargetOptions {
12 vendor: String::new(),
13 linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
14 linker: Some("rust-lld".to_owned()),
15 features: "+v7,+vfp3,-d32,+thumb2,-neon,+strict-align".to_string(),
16 executables: true,
17 relocation_model: RelocModel::Static,
18 disable_redzone: true,
19 max_atomic_width: Some(64),
20 panic_strategy: PanicStrategy::Abort,
21 unsupported_abis: super::arm_base::unsupported_abis(),
22 emit_debug_gdb_scripts: false,
23 ..Default::default()
24 };
25 Target {
26 llvm_target: "armv7a-none-eabihf".to_string(),
27 pointer_width: 32,
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(),
30 options: opts,
31 }
32 }