]> git.proxmox.com Git - rustc.git/blame - src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs
New upstream version 1.35.0+dfsg1
[rustc.git] / src / librustc_target / spec / armv7_unknown_linux_musleabihf.rs
CommitLineData
9fa01778 1use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
5bcae85e 2
0731742a
XL
3// This target is for musl Linux on ARMv7 without thumb-mode or NEON.
4
5bcae85e 5pub fn target() -> TargetResult {
0531ce1d 6 let base = super::linux_musl_base::opts();
5bcae85e
SL
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(),
ea8adc8c 14 target_c_int_width: "32".to_string(),
5bcae85e
SL
15 data_layout: "e-m:e-p:32:32-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(),
cc61c64b 20 linker_flavor: LinkerFlavor::Gcc,
0531ce1d
XL
21
22 // Most of these settings are copied from the armv7_unknown_linux_gnueabihf
23 // target.
c30ab7b3 24 options: TargetOptions {
0531ce1d
XL
25 features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(),
26 cpu: "generic".to_string(),
27 max_atomic_width: Some(64),
c30ab7b3 28 abi_blacklist: super::arm_base::abi_blacklist(),
532ac7d7 29 target_mcount: "\u{1}mcount".to_string(),
c30ab7b3 30 .. base
0531ce1d 31 }
5bcae85e
SL
32 })
33}