]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs
Auto merge of #77893 - petertodd:2020-impl-default-for-phantompinned, r=dtolnay
[rust.git] / compiler / rustc_target / src / spec / aarch64_unknown_none_softfloat.rs
1 // Generic AArch64 target for bare-metal code - Floating point disabled
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".to_owned()),
15         features: "+strict-align,-neon,-fp-armv8".to_string(),
16         executables: true,
17         relocation_model: RelocModel::Static,
18         disable_redzone: true,
19         linker_is_gnu: true,
20         max_atomic_width: Some(128),
21         panic_strategy: PanicStrategy::Abort,
22         unsupported_abis: super::arm_base::unsupported_abis(),
23         ..Default::default()
24     };
25     Target {
26         llvm_target: "aarch64-unknown-none".to_string(),
27         pointer_width: 64,
28         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
29         arch: "aarch64".to_string(),
30         options: opts,
31     }
32 }