Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Mar 3, 2023

Conversation

joncinque
Copy link
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
Copy link

vercel bot commented Feb 10, 2023

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

A member of the Team first needs to authorize it.

@0xdeepmehta
Copy link
Contributor

lgtm 🚀

@Henry-E
Copy link
Contributor

Henry-E commented Mar 3, 2023

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 coral-xyz:master Mar 3, 2023
@joncinque joncinque deleted the sbf branch March 3, 2023 17:07
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.

None yet

3 participants