]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs
Rollup merge of #82497 - jyn514:json, r=CraftSpider
[rust.git] / compiler / rustc_target / src / spec / riscv32imc_unknown_none_elf.rs
1 use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel};
2 use crate::spec::{Target, TargetOptions};
3
4 pub fn target() -> Target {
5     Target {
6         data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
7         llvm_target: "riscv32".to_string(),
8         pointer_width: 32,
9         arch: "riscv32".to_string(),
10
11         options: TargetOptions {
12             linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
13             linker: Some("rust-lld".to_string()),
14             cpu: "generic-rv32".to_string(),
15             max_atomic_width: Some(0),
16             atomic_cas: false,
17             features: "+m,+c".to_string(),
18             executables: true,
19             panic_strategy: PanicStrategy::Abort,
20             relocation_model: RelocModel::Static,
21             emit_debug_gdb_scripts: false,
22             unsupported_abis: super::riscv_base::unsupported_abis(),
23             eh_frame_header: false,
24             ..Default::default()
25         },
26     }
27 }