]> git.proxmox.com Git - rustc.git/blame - src/librustc_target/spec/riscv32i_unknown_none_elf.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / librustc_target / spec / riscv32i_unknown_none_elf.rs
CommitLineData
f9f354fc
XL
1use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel};
2use crate::spec::{Target, TargetOptions, TargetResult};
416331ca
XL
3
4pub fn target() -> TargetResult {
5 Ok(Target {
6 data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(),
7 llvm_target: "riscv32".to_string(),
8 target_endian: "little".to_string(),
9 target_pointer_width: "32".to_string(),
10 target_c_int_width: "32".to_string(),
11 target_os: "none".to_string(),
12 target_env: String::new(),
13 target_vendor: "unknown".to_string(),
14 arch: "riscv32".to_string(),
15 linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
16
17 options: TargetOptions {
18 linker: Some("rust-lld".to_string()),
19 cpu: "generic-rv32".to_string(),
60c5eb7d 20 max_atomic_width: Some(0),
416331ca
XL
21 atomic_cas: false,
22 features: String::new(),
23 executables: true,
24 panic_strategy: PanicStrategy::Abort,
f9f354fc 25 relocation_model: RelocModel::Static,
416331ca 26 emit_debug_gdb_scripts: false,
f035d41b 27 unsupported_abis: super::riscv_base::unsupported_abis(),
dfeec247 28 ..Default::default()
416331ca
XL
29 },
30 })
31}