]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
1 | use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel}; |
2 | use crate::spec::{Target, TargetOptions, TargetResult}; | |
b7449926 XL |
3 | |
4 | pub 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(), | |
20 | max_atomic_width: Some(32), | |
9fa01778 | 21 | atomic_cas: true, |
b7449926 XL |
22 | features: "+m,+a,+c".to_string(), |
23 | executables: true, | |
24 | panic_strategy: PanicStrategy::Abort, | |
f9f354fc | 25 | relocation_model: RelocModel::Static, |
b7449926 | 26 | emit_debug_gdb_scripts: false, |
f035d41b | 27 | unsupported_abis: super::riscv_base::unsupported_abis(), |
dfeec247 | 28 | ..Default::default() |
b7449926 XL |
29 | }, |
30 | }) | |
31 | } |