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

Update toolchain to LLVM 18 #105

Conversation

LucasSte
Copy link
Collaborator

@LucasSte LucasSte commented Jul 6, 2024

Besides cherry-picking the commits, I added a panic in the BPF target when someone tries to use it with Solana. The upstream BPF target accumulated too many changes that conflict with our previous ones, so I'm dropping the support for it. The next release won't include changes in the BPF target.

Check BPFSubtarget.cpp

  if (IsSolana) {
    report_fatal_error("The Solana target is not supported in BPF. Use SBF instead.");
  }

jackcmay and others added 30 commits June 28, 2024 10:33
…a-xyz#4)

* [BPF] Make rust allocation builtins unavailable for BPF target

- the calls to rust alloc/dealloc routines need to be preserved and
not replaced by compiler generated builtin inlined code
* [SOL][BPF] Adjust BPF tests

* [SOL][BPF] Improve reporting of stack size is too large

- issue only one warning for each function
- report the function location if debug information is available
* [SOL] Make lld thread-safe with llvm when used in-process

Every time Solang tries to link a web-assembly file in-process, the linker
re-inits llvm which is not thread-safe with the rest of solang.

Signed-off-by: Sean Young <[email protected]>

* [SOL][BPF] Enable the _ExtInt extension on the BPF Target for Solana

Signed-off-by: Sean Young <[email protected]>
Solana extends BPF so that structs type information is not fully
supported in BTF.  This leads to ICE crashes and some unsupported
relocations being emitted in binary files that linker errors on.
For, now the debug information is simply disabled when compiling
for Solana to avoid the errors in Debug builds.
@LucasSte LucasSte force-pushed the solana-rustc/18.1-2024-05-19 branch from 72b3ff4 to 3b6ff9f Compare July 7, 2024 16:14
@LucasSte LucasSte force-pushed the solana-rustc/18.1-2024-05-19 branch from d1bb2f0 to c513290 Compare August 16, 2024 17:44
@LucasSte LucasSte force-pushed the solana-rustc/18.1-2024-05-19 branch 2 times, most recently from 3e640d1 to 2920e58 Compare August 16, 2024 22:06
@LucasSte LucasSte force-pushed the solana-rustc/18.1-2024-05-19 branch from 2920e58 to ff311cc Compare August 18, 2024 21:21
@LucasSte LucasSte force-pushed the solana-rustc/18.1-2024-05-19 branch from ff311cc to 0f67554 Compare August 18, 2024 21:29
@LucasSte
Copy link
Collaborator Author

Besides the basic adjustments for Rust 1.79, I included here the implementation of atomic load and store and atomic swap as they were now necessary to compiler Rust 1.79.

I registered the SBF target and removed the debug checks for relocations in the linker. The latter is not implemented for the SBF target, but it is used in the Rust test suit.

@LucasSte LucasSte requested a review from dmakarov August 19, 2024 12:45
@LucasSte LucasSte marked this pull request as ready for review August 19, 2024 12:45
@LucasSte LucasSte merged commit 646ec14 into anza-xyz:solana-rustc/18.1-2024-05-19 Aug 19, 2024
18 checks passed
@LucasSte LucasSte deleted the solana-rustc/18.1-2024-05-19 branch August 19, 2024 14:53
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.

7 participants