]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/armv7a_none_eabihf.rs
Auto merge of #97800 - pnkfelix:issue-97463-fix-aarch64-call-abi-does-not-zeroext...
[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         abi: "eabihf".into(),
13         linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
14         linker: Some("rust-lld".into()),
15         features: "+v7,+vfp3,-d32,+thumb2,-neon,+strict-align".into(),
16         relocation_model: RelocModel::Static,
17         disable_redzone: true,
18         max_atomic_width: Some(64),
19         panic_strategy: PanicStrategy::Abort,
20         emit_debug_gdb_scripts: false,
21         // GCC and Clang default to 8 for arm-none here
22         c_enum_min_bits: 8,
23         ..Default::default()
24     };
25     Target {
26         llvm_target: "armv7a-none-eabihf".into(),
27         pointer_width: 32,
28         data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
29         arch: "arm".into(),
30         options: opts,
31     }
32 }