rust-lang / rust-lang/rust

Update std::offload to leverage LLVM 22

Open
#151,761 0 comments 0 reactions 1 assignee View on GitHub

@ZuseZ4 is already working on this.

Since Jan 27, 2026.

A-LLVM F-gpu_offload T-bootstrap T-compiler
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

LLVM 22 brings some new APIs which can simplify our setup.
This is also a good opportunity to "lower" directly to offload instead of openmp.
openmp's GPU features are nowadays implemented on top of LLVM's offload project. If we directly generate offload calls and bypass openmp we can drop a couple of libraries that are only needed by openmp, but not offload.

  • Update our bootstrap to use the new LLVM-22 cmake options

  • Update bootstrap to always build libc-for-gpu when offload is enabled, to allow std on GPUs

  • Lower to ol instead of omp library calls

  • Drop libomp, libomptarget, libompdevice since they are only needed by omp, replace it by liboffload

  • Update the openmp-opt pass to work with ol names.

  • Finish replacing the clang-linker-wrapper.

  • Tracking:
    https://github.com/rust-lang/rust/issues/131513

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.