]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs
Auto merge of #97800 - pnkfelix:issue-97463-fix-aarch64-call-abi-does-not-zeroext...
[rust.git] / compiler / rustc_target / src / spec / thumbv7neon_unknown_linux_musleabihf.rs
1 use crate::spec::{Target, TargetOptions};
2
3 // This target is for musl Linux on ARMv7 with thumb mode enabled
4 // (for consistency with Android and Debian-based distributions)
5 // and with NEON unconditionally enabled and, therefore, with 32 FPU
6 // registers enabled as well. See section A2.6.2 on page A2-56 in
7 // https://static.docs.arm.com/ddi0406/cd/DDI0406C_d_armv7ar_arm.pdf
8
9 pub fn target() -> Target {
10     Target {
11         // It's important we use "gnueabihf" and not "musleabihf" here. LLVM
12         // uses it to determine the calling convention and float ABI, and LLVM
13         // doesn't support the "musleabihf" value.
14         llvm_target: "armv7-unknown-linux-gnueabihf".into(),
15         pointer_width: 32,
16         data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
17         arch: "arm".into(),
18
19         // Most of these settings are copied from the thumbv7neon_unknown_linux_gnueabihf
20         // target.
21         options: TargetOptions {
22             abi: "eabihf".into(),
23             features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".into(),
24             max_atomic_width: Some(64),
25             mcount: "\u{1}mcount".into(),
26             ..super::linux_musl_base::opts()
27         },
28     }
29 }