1 use crate::spec::{CodeModel, Target, TargetOptions, TargetResult};
2 use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel};
4 pub fn target() -> TargetResult {
6 data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(),
7 llvm_target: "riscv64".to_string(),
8 target_endian: "little".to_string(),
9 target_pointer_width: "64".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: "riscv64".to_string(),
15 linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
17 options: TargetOptions {
18 linker: Some("rust-lld".to_string()),
19 cpu: "generic-rv64".to_string(),
20 max_atomic_width: Some(64),
22 features: "+m,+a,+c".to_string(),
24 panic_strategy: PanicStrategy::Abort,
25 relocation_model: RelocModel::Static,
26 code_model: Some(CodeModel::Medium),
27 emit_debug_gdb_scripts: false,
28 unsupported_abis: super::riscv_base::unsupported_abis(),