rustc_target/spec/targets/
armv4t_none_eabi.rs

1//! Targets the ARMv4T, with code as `a32` code by default.
2//!
3//! Primarily of use for the GBA, but usable with other devices too.
4//!
5//! Please ping @Lokathor if changes are needed.
6//!
7//! **Important:** This target profile **does not** specify a linker script. You
8//! just get the default link script when you build a binary for this target.
9//! The default link script is very likely wrong, so you should use
10//! `-Clink-arg=-Tmy_script.ld` to override that with a correct linker script.
11
12use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base, cvs};
13
14pub(crate) fn target() -> Target {
15    Target {
16        llvm_target: "armv4t-none-eabi".into(),
17        metadata: TargetMetadata {
18            description: Some("Bare Armv4T".into()),
19            tier: Some(3),
20            host_tools: Some(false),
21            std: Some(false),
22        },
23        pointer_width: 32,
24        arch: Arch::Arm,
25        data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
26        options: TargetOptions {
27            abi: Abi::Eabi,
28            llvm_floatabi: Some(FloatAbi::Soft),
29            asm_args: cvs!["-mthumb-interwork", "-march=armv4t", "-mlittle-endian",],
30            features: "+soft-float,+strict-align".into(),
31            atomic_cas: false,
32            max_atomic_width: Some(0),
33            has_thumb_interworking: true,
34            ..base::arm_none::opts()
35        },
36    }
37}