Skip to content

[Offload] libc-for-gpu does not support Rust's bootstrap setup #179375

@ZuseZ4

Description

@ZuseZ4

I am currently updating the rust-offload bootstrap config from LLVM-21 to 22. https://rustc-dev-guide.rust-lang.org/offload/installation.html
In the process, I am also trying to enable libc-for-gpu, since openmp/offload/libc-for-gpu now apparently have similar build setups.

The Rust bootstrap process might be special, because we build a clone of llvm/llvm-project once to get clang and lld, and then use those to compile all the following C++ code, and bootstrap our actual llvm submodule of rustc. When building llvm as a submodule, we don't enable Clang, first because we don't ship it, second because we build this submodule ~4 times (due to pgo, bolt, etc.). Clang is comparably slow to build, and these dist runners are already holding back our CI, so we really don't want to build clang again and make them even slower.

Building openmp/offload/libc-for-gpu without the Clang project enabled doesn't seem well tested, so I ran into a few bugs. With the help of @jhuber6 I got around almost all of them, except that we still need #178548
If that could be backported to one of the next RC, it would enable Rust to build the project without having to wait for LLVM23, or cherry-picking it into our llvm fork that we try to keep small.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions