]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_target/src/spec/aarch64_unknown_none.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / aarch64_unknown_none.rs
CommitLineData
e74abb32 1// Generic AArch64 target for bare-metal code - Floating point enabled
b7449926
XL
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
f9f354fc 9use super::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel, Target, TargetOptions};
b7449926 10
29967ef6 11pub fn target() -> Target {
b7449926 12 let opts = TargetOptions {
29967ef6 13 linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
b7449926 14 linker: Some("rust-lld".to_owned()),
e74abb32 15 features: "+strict-align,+neon,+fp-armv8".to_string(),
b7449926 16 executables: true,
f9f354fc 17 relocation_model: RelocModel::Static,
b7449926 18 disable_redzone: true,
b7449926
XL
19 max_atomic_width: Some(128),
20 panic_strategy: PanicStrategy::Abort,
dfeec247 21 ..Default::default()
b7449926 22 };
29967ef6 23 Target {
b7449926 24 llvm_target: "aarch64-unknown-none".to_string(),
29967ef6 25 pointer_width: 64,
b7449926
XL
26 data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
27 arch: "aarch64".to_string(),
b7449926 28 options: opts,
29967ef6 29 }
b7449926 30}