]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs
New upstream version 1.49.0~beta.4+dfsg1
[rustc.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 vendor: String::new(),
14 linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
15 linker: Some("rust-lld".to_owned()),
16 features: "+strict-align,-neon,-fp-armv8".to_string(),
17 executables: true,
18 relocation_model: RelocModel::Static,
19 disable_redzone: true,
20 linker_is_gnu: true,
21 max_atomic_width: Some(128),
22 panic_strategy: PanicStrategy::Abort,
23 unsupported_abis: super::arm_base::unsupported_abis(),
24 ..Default::default()
25 };
26 Target {
27 llvm_target: "aarch64-unknown-none".to_string(),
28 pointer_width: 64,
29 data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
30 arch: "aarch64".to_string(),
31 options: opts,
32 }
33 }