Skip to content

cli: Add arch option to use build-sbf or build-bpf - #2398

Merged
Henry-E merged 2 commits into
otter-sec:masterfrom
joncinque:sbf
Mar 3, 2023
Merged

cli: Add arch option to use build-sbf or build-bpf#2398
Henry-E merged 2 commits into
otter-sec:masterfrom
joncinque:sbf

Conversation

@joncinque

Copy link
Copy Markdown
Contributor

Problem

Some programs use cargo build-sbf, like the solana-program-library, but the verifiable builds through Anchor default to cargo build-bpf. I noticed this while performing a verifiable build of token-2022.

Solution

This adds an --arch flag to control using build-sbf if you pass in --arch sbf, defaults to bpf. This way, it'll be possible to support SBFv2 and any other format that might come out. I initially had this as a simple bool flag, but the arch flag makes more sense to me. Let me know what you think!

@vercel

vercel Bot commented Feb 10, 2023

Copy link
Copy Markdown

@joncinque is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@0xDeeep

0xDeeep commented Mar 2, 2023

Copy link
Copy Markdown
Contributor

lgtm 🚀

@Henry-E

Henry-E commented Mar 3, 2023

Copy link
Copy Markdown

Sounds good. In the future we should probably switch to sbf as the default option but probably best to leave it as bpf for now in the next anchor version.

Usage is anchor test --arch sbf or anchor build --arch sbf.

@Henry-E
Henry-E merged commit 06c4232 into otter-sec:master Mar 3, 2023
@joncinque
joncinque deleted the sbf branch March 3, 2023 17:07
akash-osec pushed a commit to akash-osec/anchor that referenced this pull request Mar 25, 2026
@jamie-osec jamie-osec added this to the Pre-1.0 milestone Jun 24, 2026
akash-osec pushed a commit to akash-osec/anchor that referenced this pull request Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants