Skip to main content

rustc_target/spec/targets/
arm_unknown_linux_gnueabihf.rs

1use crate::spec::{
2    Arch, CfgAbi, FloatAbi, SanitizerSet, Target, TargetMetadata, TargetOptions, base,
3};
4
5pub(crate) fn target() -> Target {
6    Target {
7        llvm_target: "arm-unknown-linux-gnueabihf".into(),
8        metadata: TargetMetadata {
9            description: Some("Armv6 Linux, hardfloat (kernel 3.2, glibc 2.17)".into()),
10            tier: Some(2),
11            host_tools: Some(true),
12            std: Some(true),
13        },
14        pointer_width: 32,
15        data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
16        arch: Arch::Arm,
17        options: TargetOptions {
18            cfg_abi: CfgAbi::EabiHf,
19            llvm_floatabi: Some(FloatAbi::Hard),
20            features: "+strict-align,+v6,+vfp2".into(),
21            max_atomic_width: Some(64),
22            mcount: "\u{1}__gnu_mcount_nc".into(),
23            llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()),
24            // The default on linux is to have `default_uwtable=true`, but on
25            // this target we get an "`__aeabi_unwind_cpp_pr0` not defined"
26            // linker error, so set it to `true` here.
27            // FIXME(#146996): Remove this override once #146996 has been fixed.
28            default_uwtable: false,
29            supported_sanitizers: SanitizerSet::ADDRESS,
30            ..base::linux_gnu::opts()
31        },
32    }
33}