Skip to content

[SBF] backport sbpfv3 changes to 1.75.0 - #155

Open
nagisa wants to merge 2 commits into
anza-xyz:solana-1.75.0from
nagisa:solana-1750-sbpfv3-backport
Open

[SBF] backport sbpfv3 changes to 1.75.0#155
nagisa wants to merge 2 commits into
anza-xyz:solana-1.75.0from
nagisa:solana-1750-sbpfv3-backport

Conversation

@nagisa

@nagisa nagisa commented Aug 4, 2026

Copy link
Copy Markdown

This is unlike the other backports in #156 and #158 in that this particular backport does not preserve the sbf-solana-solana target. This target, however, is dead either way and so keeping it working brings no benefit.

@nagisa
nagisa marked this pull request as draft August 4, 2026 18:30
@nagisa

nagisa commented Aug 4, 2026

Copy link
Copy Markdown
Author

(I decided to start from the oldest end here because I think its going to be easier to bring the same set of changes forward once the full set of them is determined, rather than going backwards and needing to pull increasingly more and more stuff as the code gets less and less… developed :))

Comment thread compiler/rustc_target/src/spec/mod.rs Outdated
Comment on lines +1695 to +1696
("sbf-solana-solana", sbf_solana_solana),
("sbpfv3-solana-solana", sbpfv3_solana_solana),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the case I was fearing.

I believe it is easier to make SBF the new v3 here. The new triple requires quite a few changes on the LLVM side.

@nagisa nagisa Aug 7, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care much either way, but rustc can specify whatever LLVM target it wishes to LLVM. Though I guess the problem with the making sbf be v3 here is more that we wouldn't have the original sbf behaviour available on the llvm side anymore?

Whatever we do on the llvm side, I would still suggest that we expose the target as sbpfv3 on the rust side and, if needed, delete the old sbf rust target.

@LucasSte LucasSte Aug 7, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care much either way, but rustc can specify whatever LLVM target it wishes to LLVM.

I remember trying routing different triples to the same target in LLVM in the past, but it didn't work well. I guess because we also need clang support. I had to create all triples in Triple.cpp.

Though I guess the problem with the making sbf be v3 here is more that we wouldn't have the original sbf behaviour available on the llvm side anymore?

We will disable v0 either way, so I don't think we need to maintain the old behavior.

Whatever we do on the llvm side, I would still suggest that we expose the target as sbpfv3 on the rust side and, if needed, delete the old sbf rust target.

Whatever option you choose, make sure to update the behavior of cargo-build-sbf. It invokes the sbf triple for old versions of platform tools.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I can try to just cherry-pick the commit: anza-xyz/llvm-project@08aedd6

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will disable v0 either way, so I don't think we need to maintain the old behavior.

Alright, I'll adjust accordingly.

@nagisa nagisa changed the title backport sbpfv3 target [SBF] backport sbpfv3 changes to 1.75.0 Aug 7, 2026
@nagisa
nagisa force-pushed the solana-1750-sbpfv3-backport branch from 49f4e0e to 65aca57 Compare August 7, 2026 10:10
@nagisa
nagisa force-pushed the solana-1750-sbpfv3-backport branch from 65aca57 to e843e6e Compare August 14, 2026 10:48
@nagisa
nagisa marked this pull request as ready for review August 14, 2026 10:49
@nagisa
nagisa force-pushed the solana-1750-sbpfv3-backport branch 9 times, most recently from 0c5140c to 41cd58b Compare August 18, 2026 12:22
@nagisa
nagisa force-pushed the solana-1750-sbpfv3-backport branch from 41cd58b to 2df5ced Compare August 18, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants