]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/aarch64_unknown_none.rs
Rollup merge of #105484 - nbdd0121:upcast, r=compiler-errors
[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::{
10     Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, Target, TargetOptions,
11 };
12
13 pub fn target() -> Target {
14     let opts = TargetOptions {
15         linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
16         linker: Some("rust-lld".into()),
17         features: "+strict-align,+neon,+fp-armv8".into(),
18         supported_sanitizers: SanitizerSet::KCFI,
19         relocation_model: RelocModel::Static,
20         disable_redzone: true,
21         max_atomic_width: Some(128),
22         panic_strategy: PanicStrategy::Abort,
23         ..Default::default()
24     };
25     Target {
26         llvm_target: "aarch64-unknown-none".into(),
27         pointer_width: 64,
28         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
29         arch: "aarch64".into(),
30         options: opts,
31     }
32 }