|
| 1 | +use crate::spec::{Cc, CodeModel, LinkerFlavor, Lld, PanicStrategy}; |
| 2 | +use crate::spec::{RelocModel, SanitizerSet, Target, TargetOptions}; |
| 3 | + |
| 4 | +pub fn target() -> Target { |
| 5 | + Target { |
| 6 | + data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), |
| 7 | + llvm_target: "riscv64".into(), |
| 8 | + pointer_width: 64, |
| 9 | + arch: "riscv64".into(), |
| 10 | + |
| 11 | + options: TargetOptions { |
| 12 | + linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), |
| 13 | + linker: Some("rust-lld".into()), |
| 14 | + cpu: "generic-rv64".into(), |
| 15 | + max_atomic_width: Some(64), |
| 16 | + features: "+m,+a,+c,+f".into(), |
| 17 | + panic_strategy: PanicStrategy::Abort, |
| 18 | + relocation_model: RelocModel::Static, |
| 19 | + code_model: Some(CodeModel::Medium), |
| 20 | + emit_debug_gdb_scripts: false, |
| 21 | + eh_frame_header: false, |
| 22 | + supported_sanitizers: SanitizerSet::KERNELADDRESS, |
| 23 | + ..Default::default() |
| 24 | + }, |
| 25 | + } |
| 26 | +} |
0 commit comments