Skip to content

Commit 967b4ee

Browse files
committed
feat: 64bit
1 parent b12c91e commit 967b4ee

File tree

8 files changed

+55
-8
lines changed

8 files changed

+55
-8
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ jobs:
4646
- name: Check out succinctlabs/sp1
4747
uses: actions/checkout@v3
4848
with:
49-
repository: succinctlabs/sp1
50-
ref: dev
49+
repository: succinctlabs/sp1-wip
50+
token: ${{ secrets.PRIVATE_PULL_TOKEN }}
51+
ref: n/fix-ci-and-toolchain-cleanup
5152
path: sp1
5253

5354
- name: Build
5455
run: |
56+
git config --global url."https://${{ secrets.PRIVATE_PULL_TOKEN }}github.com/".insteadOf "https://github.com/"
5557
cd sp1/crates/cli
5658
GITHUB_ACTIONS=false SP1_BUILD_DIR=$GITHUB_WORKSPACE cargo run --bin cargo-prove -- prove build-toolchain
5759
@@ -94,17 +96,19 @@ jobs:
9496
- name: Check out succinctlabs/sp1
9597
uses: actions/checkout@v3
9698
with:
97-
repository: succinctlabs/sp1
98-
ref: dev
99+
repository: succinctlabs/sp1-wip
100+
token: ${{ secrets.PRIVATE_PULL_TOKEN }}
101+
ref: n/fix-ci-and-toolchain-cleanup
99102
path: sp1
100103

101104
- name: Build
102105
run: |
106+
git config --global url."https://${{ secrets.PRIVATE_PULL_TOKEN }}github.com/".insteadOf "https://github.com/"
103107
cd sp1/crates/cli
104108
GITHUB_ACTIONS=false SP1_BUILD_DIR=$GITHUB_WORKSPACE cargo run --bin cargo-prove -- prove build-toolchain
105109
106110
- name: Archive build output
107111
uses: actions/upload-artifact@v4
108112
with:
109113
name: rust-toolchain-aarch64-unknown-linux-gnu
110-
path: sp1/crates/cli/rust-toolchain-aarch64-unknown-linux-gnu.tar.gz
114+
path: sp1/crates/cli/rust-toolchain-aarch64-unknown-linux-gnu.tar.gz

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
jobs:
77
build:
88
uses: ./.github/workflows/ci.yml
9+
secrets: inherit
910
release:
1011
needs: build
1112
runs-on: ubuntu-latest
@@ -36,4 +37,4 @@ jobs:
3637
else
3738
echo "No files to release. Exiting."
3839
exit 1
39-
fi
40+
fi

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,7 @@ supported_targets! {
19741974
("riscv32gc-unknown-linux-gnu", riscv32gc_unknown_linux_gnu),
19751975
("riscv32gc-unknown-linux-musl", riscv32gc_unknown_linux_musl),
19761976
("riscv64imac-unknown-none-elf", riscv64imac_unknown_none_elf),
1977+
("riscv64im-succinct-zkvm-elf", riscv64im_succinct_zkvm_elf),
19771978
("riscv64gc-unknown-none-elf", riscv64gc_unknown_none_elf),
19781979
("riscv64gc-unknown-linux-gnu", riscv64gc_unknown_linux_gnu),
19791980
("riscv64gc-unknown-linux-musl", riscv64gc_unknown_linux_musl),
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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:64:64-i64:64-i128:128-n32:64-S128".into(),
8+
llvm_target: "riscv64".into(),
9+
metadata: TargetMetadata {
10+
description: Some("Succinct's zero-knowledge Virtual Machine (RV64IM ISA)".into()),
11+
tier: Some(3),
12+
host_tools: Some(false),
13+
std: None, // ?
14+
},
15+
pointer_width: 64,
16+
arch: "riscv64".into(),
17+
18+
options: TargetOptions {
19+
os: "zkvm".into(),
20+
vendor: "succinct".into(),
21+
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
22+
linker: Some("rust-lld".into()),
23+
cpu: "generic-rv64".into(),
24+
25+
max_atomic_width: Some(64),
26+
atomic_cas: true,
27+
28+
features: "+m".into(),
29+
llvm_abiname: "lp64".into(),
30+
executables: true,
31+
panic_strategy: PanicStrategy::Abort,
32+
relocation_model: RelocModel::Static,
33+
emit_debug_gdb_scripts: false,
34+
eh_frame_header: false,
35+
singlethread: true,
36+
..Default::default()
37+
},
38+
}
39+
}

src/bootstrap/Cargo.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ dependencies = [
9090
[[package]]
9191
name = "cc"
9292
version = "1.2.17"
93-
source = "git+https://github.com/leruaa/cc-rs?branch=aurelien%2Fadd-succinct-target#1cdaea42e4044e135817d49005f8b7e812e4cbfa"
93+
source = "git+https://github.com/succinctlabs/cc-rs?branch=add-succinct-target#a182366ce32d9bac95bfd2d65cf212262a809257"
9494
dependencies = [
9595
"shlex",
9696
]

src/bootstrap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ debug = 0
9595
bootstrap.debug = 1
9696

9797
[patch.crates-io]
98-
cc = { git = "https://github.com/leruaa/cc-rs", branch = "aurelien/add-succinct-target" }
98+
cc = { git = "https://github.com/succinctlabs/cc-rs", branch = "add-succinct-target" }

src/bootstrap/src/core/sanity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub struct Finder {
3535
const STAGE0_MISSING_TARGETS: &[&str] = &[
3636
// just a dummy comment so the list doesn't get onelined
3737
"riscv32im-succinct-zkvm-elf",
38+
"riscv64im-succinct-zkvm-elf",
3839
"x86_64-lynx-lynxos178",
3940
];
4041

src/tools/build-manifest/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ static TARGETS: &[&str] = &[
145145
"riscv32imafc-unknown-none-elf",
146146
"riscv32gc-unknown-linux-gnu",
147147
"riscv64imac-unknown-none-elf",
148+
"riscv64im-succinct-zkvm-elf",
148149
"riscv64gc-unknown-hermit",
149150
"riscv64gc-unknown-none-elf",
150151
"riscv64gc-unknown-linux-gnu",

0 commit comments

Comments
 (0)