@@ -8,9 +8,38 @@ source config.sh
8
8
need_cmd clang
9
9
need_cmd clang++
10
10
11
- # Rust requires a custom target file to exist for our custom target as part of the bootstrap build,
12
- # but it doesn't actually look at the contents.
13
- touch /tmp/riscv32em-athena-zkvm-elf.json
11
+ # We need to bootstrap the new target for Rust
12
+ cat > /tmp/riscv32em-athena-zkvm-elf.json << EOF
13
+ {
14
+ "arch": "riscv32",
15
+ "cpu": "generic-rv32",
16
+ "crt-objects-fallback": "false",
17
+ "data-layout": "e-m:e-p:32:32-i64:64-n32-S32",
18
+ "eh-frame-header": false,
19
+ "emit-debug-gdb-scripts": false,
20
+ "features": "+e,+m",
21
+ "linker": "rust-lld",
22
+ "linker-flavor": "gnu-lld",
23
+ "llvm-abiname": "ilp32e",
24
+ "llvm-target": "riscv32",
25
+ "max-atomic-width": 32,
26
+ "os": "zkvm",
27
+ "panic-strategy": "abort",
28
+ "relocation-model": "static",
29
+ "singlethread": true,
30
+ "target-pointer-width": "32",
31
+ "vendor": "athena",
32
+ "options": {
33
+ "c-flags": "-march=rv32e -mabi=ilp32e",
34
+ "pre-link-args": {
35
+ "gcc": [
36
+ "-march=rv32e",
37
+ "-mabi=ilp32e"
38
+ ]
39
+ }
40
+ }
41
+ }
42
+ EOF
14
43
export RUST_TARGET_PATH=" /tmp"
15
44
16
45
# Explicitly set CFLAGS without the problematic flags
0 commit comments