]> git.proxmox.com Git - rustc.git/blame - src/librustc_target/spec/armv7a_none_eabihf.rs
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_target / spec / armv7a_none_eabihf.rs
CommitLineData
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 8use super::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel, Target, TargetOptions};
dfeec247
XL
9
10pub fn target() -> Result<Target, String> {
11 let opts = TargetOptions {
12 linker: Some("rust-lld".to_owned()),
13 features: "+v7,+vfp3,-d32,+thumb2,-neon,+strict-align".to_string(),
14 executables: true,
f9f354fc 15 relocation_model: RelocModel::Static,
dfeec247
XL
16 disable_redzone: true,
17 max_atomic_width: Some(64),
18 panic_strategy: PanicStrategy::Abort,
f035d41b 19 unsupported_abis: super::arm_base::unsupported_abis(),
dfeec247
XL
20 emit_debug_gdb_scripts: false,
21 ..Default::default()
22 };
23 Ok(Target {
24 llvm_target: "armv7a-none-eabihf".to_string(),
25 target_endian: "little".to_string(),
26 target_pointer_width: "32".to_string(),
27 target_c_int_width: "32".to_string(),
28 target_os: "none".to_string(),
29 target_env: String::new(),
30 target_vendor: String::new(),
31 data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
32 arch: "arm".to_string(),
33 linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
34 options: opts,
35 })
36}