]> git.lizzy.rs Git - rust.git/blob - src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs
Auto merge of #68943 - ecstatic-morse:no-useless-drop-on-enum-variants, r=matthewjasper
[rust.git] / src / librustc_target / spec / armv7_unknown_linux_musleabihf.rs
1 use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
2
3 // This target is for musl Linux on ARMv7 without thumb-mode or NEON.
4
5 pub fn target() -> TargetResult {
6     let base = super::linux_musl_base::opts();
7     Ok(Target {
8         // It's important we use "gnueabihf" and not "musleabihf" here. LLVM
9         // uses it to determine the calling convention and float ABI, and LLVM
10         // doesn't support the "musleabihf" value.
11         llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
12         target_endian: "little".to_string(),
13         target_pointer_width: "32".to_string(),
14         target_c_int_width: "32".to_string(),
15         data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
16         arch: "arm".to_string(),
17         target_os: "linux".to_string(),
18         target_env: "musl".to_string(),
19         target_vendor: "unknown".to_string(),
20         linker_flavor: LinkerFlavor::Gcc,
21
22         // Most of these settings are copied from the armv7_unknown_linux_gnueabihf
23         // target.
24         options: TargetOptions {
25             features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(),
26             cpu: "generic".to_string(),
27             max_atomic_width: Some(64),
28             abi_blacklist: super::arm_base::abi_blacklist(),
29             target_mcount: "\u{1}mcount".to_string(),
30             ..base
31         },
32     })
33 }