rustc_target/spec/targets/
mips_mti_none_elf.rs

1use rustc_abi::Endian;
2
3use crate::spec::{
4    Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetMetadata, TargetOptions,
5};
6
7pub(crate) fn target() -> Target {
8    Target {
9        data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),
10        llvm_target: "mips".into(),
11        metadata: TargetMetadata {
12            description: Some("MIPS32r2 BE Baremetal Softfloat".into()),
13            tier: Some(3),
14            host_tools: Some(false),
15            std: None, // ?
16        },
17        pointer_width: 32,
18        arch: "mips".into(),
19
20        options: TargetOptions {
21            vendor: "mti".into(),
22            linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
23            linker: Some("rust-lld".into()),
24            endian: Endian::Big,
25            cpu: "mips32r2".into(),
26
27            max_atomic_width: Some(32),
28
29            features: "+mips32r2,+soft-float,+noabicalls".into(),
30            executables: true,
31            panic_strategy: PanicStrategy::Abort,
32            relocation_model: RelocModel::Static,
33            emit_debug_gdb_scripts: false,
34            eh_frame_header: false,
35            singlethread: true,
36            ..Default::default()
37        },
38    }
39}