]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/aarch64_unknown_none.rs
Auto merge of #97800 - pnkfelix:issue-97463-fix-aarch64-call-abi-does-not-zeroext...
[rust.git] / compiler / rustc_target / src / spec / aarch64_unknown_none.rs
1 // Generic AArch64 target for bare-metal code - Floating point enabled
2 //
3 // Can be used in conjunction with the `target-feature` and
4 // `target-cpu` compiler flags to opt-in more hardware-specific
5 // features.
6 //
7 // For example, `-C target-cpu=cortex-a53`.
8
9 use super::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel, Target, TargetOptions};
10
11 pub fn target() -> Target {
12     let opts = TargetOptions {
13         linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
14         linker: Some("rust-lld".into()),
15         features: "+strict-align,+neon,+fp-armv8".into(),
16         relocation_model: RelocModel::Static,
17         disable_redzone: true,
18         max_atomic_width: Some(128),
19         panic_strategy: PanicStrategy::Abort,
20         ..Default::default()
21     };
22     Target {
23         llvm_target: "aarch64-unknown-none".into(),
24         pointer_width: 64,
25         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
26         arch: "aarch64".into(),
27         options: opts,
28     }
29 }