|
| 1 | +use crate::spec::{ |
| 2 | + Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetMetadata, TargetOptions, |
| 3 | +}; |
| 4 | + |
| 5 | +pub(crate) fn target() -> Target { |
| 6 | + Target { |
| 7 | + data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), |
| 8 | + llvm_target: "riscv32".into(), |
| 9 | + metadata: TargetMetadata { |
| 10 | + description: Some("Succinct's zero-knowledge Virtual Machine (RV32IM ISA)".into()), |
| 11 | + tier: Some(3), |
| 12 | + host_tools: Some(false), |
| 13 | + std: Some(true), |
| 14 | + }, |
| 15 | + pointer_width: 32, |
| 16 | + arch: "riscv32".into(), |
| 17 | + |
| 18 | + options: TargetOptions { |
| 19 | + os: "succinct-zkvm".into(), |
| 20 | + vendor: "succinct".into(), |
| 21 | + linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), |
| 22 | + linker: Some("rust-lld".into()), |
| 23 | + cpu: "generic-rv32".into(), |
| 24 | + |
| 25 | + // The zkvm is singlethreaded and all operations are atomic. |
| 26 | + // The std-lib is compiled with lowered atomicsa and the default Succinct build tools |
| 27 | + // enforce this on programs. |
| 28 | + max_atomic_width: Some(64), |
| 29 | + atomic_cas: true, |
| 30 | + |
| 31 | + features: "+m".into(), |
| 32 | + llvm_abiname: "ilp32".into(), |
| 33 | + executables: true, |
| 34 | + panic_strategy: PanicStrategy::Abort, |
| 35 | + relocation_model: RelocModel::Static, |
| 36 | + emit_debug_gdb_scripts: false, |
| 37 | + eh_frame_header: false, |
| 38 | + singlethread: true, |
| 39 | + ..Default::default() |
| 40 | + }, |
| 41 | + } |
| 42 | +} |
0 commit comments