rustc_target/spec/targets/
armv7a_nuttx_eabihf.rs

1// Targets Cortex-A7/A8/A9 processors (ARMv7-A) running NuttX with hardware floating point
2//
3// This target assumes that the device has a FPU (Floating Point Unit)
4// and will use hardware floating point operations. This matches the NuttX EABI
5// configuration with hardware floating point support.
6
7use crate::spec::{
8    Cc, FloatAbi, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions, cvs,
9};
10
11pub(crate) fn target() -> Target {
12    let opts = TargetOptions {
13        abi: "eabihf".into(),
14        llvm_floatabi: Some(FloatAbi::Hard),
15        linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
16        linker: Some("rust-lld".into()),
17        features: "+v7,+thumb2,+vfp3,+neon,+strict-align".into(),
18        relocation_model: RelocModel::Static,
19        disable_redzone: true,
20        max_atomic_width: Some(64),
21        panic_strategy: PanicStrategy::Abort,
22        emit_debug_gdb_scripts: false,
23        c_enum_min_bits: Some(8),
24        families: cvs!["unix"],
25        os: "nuttx".into(),
26        ..Default::default()
27    };
28    Target {
29        llvm_target: "armv7a-none-eabihf".into(),
30        metadata: crate::spec::TargetMetadata {
31            description: Some("ARMv7-A Cortex-A with NuttX (hard float)".into()),
32            tier: Some(3),
33            host_tools: Some(false),
34            std: Some(true),
35        },
36        pointer_width: 32,
37        data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
38        arch: "arm".into(),
39        options: opts,
40    }
41}