Proposal
The current default linker for the nvptx64-nvidia-cuda target is rust-ptx-linker. However, the upstream rust-ptx-linker project has been broken since 2022 and is effectively unmaintained. In practice, this makes it difficult or impossible to use for most builds.
Since the introduction of the llvm-bitcode-linker it has become the recommended linker for nvptx64-nvidia-cuda in the official Rust documentation. The llvm-bitcode-linker provides a stable and maintainable path forward, and is in real world use for targeting Nvidia GPUs.
Given that:
rust-ptx-linker is no longer functional or maintained,
llvm-bitcode-linker is the officially recommended solution and actively maintained,
- and there are no known current users of
rust-ptx-linker,
I propose to switch the default linker for the nvptx64-nvidia-cuda target to llvm-bitcode-linker.
This change will:
- Eliminate the need for explicitly passing
-C linker-flavor=llbc.
- Simplify the build setup for CUDA targets.
- Lay the groundwork for potentially removing the dedicated “ptx” linker flavor in the future.
Mentors or Reviewers
The actual engineering work is trivial. I will "mentor" and create the MR if accepted
Process
The main points of the Major Change Process are as follows:
You can read more about Major Change Proposals on forge.
Proposal
The current default linker for the
nvptx64-nvidia-cudatarget isrust-ptx-linker. However, the upstreamrust-ptx-linkerproject has been broken since 2022 and is effectively unmaintained. In practice, this makes it difficult or impossible to use for most builds.Since the introduction of the llvm-bitcode-linker it has become the recommended linker for
nvptx64-nvidia-cudain the official Rust documentation. Thellvm-bitcode-linkerprovides a stable and maintainable path forward, and is in real world use for targeting Nvidia GPUs.Given that:
rust-ptx-linkeris no longer functional or maintained,llvm-bitcode-linkeris the officially recommended solution and actively maintained,rust-ptx-linker,I propose to switch the default linker for the nvptx64-nvidia-cuda target to
llvm-bitcode-linker.This change will:
-C linker-flavor=llbc.Mentors or Reviewers
The actual engineering work is trivial. I will "mentor" and create the MR if accepted
Process
The main points of the Major Change Process are as follows:
@rustbot secondor kickoff a team FCP with@rfcbot fcp $RESOLUTION.You can read more about Major Change Proposals on forge.