]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/armv7a_none_eabihf.rs
Auto merge of #77618 - fusion-engineering-forks:windows-parker, r=Amanieu
[rust.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         linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
13         linker: Some("rust-lld".to_owned()),
14         features: "+v7,+vfp3,-d32,+thumb2,-neon,+strict-align".to_string(),
15         executables: true,
16         relocation_model: RelocModel::Static,
17         disable_redzone: true,
18         max_atomic_width: Some(64),
19         panic_strategy: PanicStrategy::Abort,
20         unsupported_abis: super::arm_base::unsupported_abis(),
21         emit_debug_gdb_scripts: false,
22         ..Default::default()
23     };
24     Target {
25         llvm_target: "armv7a-none-eabihf".to_string(),
26         pointer_width: 32,
27         data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
28         arch: "arm".to_string(),
29         options: opts,
30     }
31 }