Skip to content

NVPTX: Remove the unstable ptx linker flavor#157068

Open
kjetilkjeka wants to merge 1 commit into
rust-lang:mainfrom
kjetilkjeka:remove-ptx-linker-flavor
Open

NVPTX: Remove the unstable ptx linker flavor#157068
kjetilkjeka wants to merge 1 commit into
rust-lang:mainfrom
kjetilkjeka:remove-ptx-linker-flavor

Conversation

@kjetilkjeka
Copy link
Copy Markdown
Contributor

@kjetilkjeka kjetilkjeka commented May 28, 2026

Remove the ptx linker flavor as specified in this accepted MCP

Fixes #156954

@rustbot label +O-NVPTX

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 28, 2026

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 28, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 28, 2026

r? @adwinwhite

rustbot has assigned @adwinwhite.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 73 candidates
  • Random selection from 20 candidates

@rustbot rustbot added the O-NVPTX Target: the NVPTX LLVM backend for running rust on GPUs, https://llvm.org/docs/NVPTXUsage.html label May 28, 2026
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] tests/ui/zero-sized/zero-sized-btreemap-insert.rs ... ok

failures:

---- [ui] tests/ui/linkage-attr/unstable-flavor.rs#ptx stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/linkage-attr/unstable-flavor.ptx/unstable-flavor.ptx.stderr`
diff of stderr:

- error: the linker flavor `ptx` is unstable, the `-Z unstable-options` flag must also be passed to use the unstable values
+ error: incorrect value `ptx` for codegen option `linker-flavor` - one of: gnu gnu-lld gnu-cc gnu-lld-cc darwin darwin-lld darwin-cc darwin-lld-cc wasm-lld wasm-lld-cc unix unix-cc msvc-lld msvc em-cc bpf llbc gcc ld ld.lld ld64.lld lld-link wasm-ld em  was expected
2 
3 


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args linkage-attr/unstable-flavor.rs`

error in revision `ptx`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/linkage-attr/unstable-flavor.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--cfg" "ptx" "--check-cfg" "cfg(test,FALSE,bpf,ptx)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/linkage-attr/unstable-flavor.ptx" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target=nvptx64-nvidia-cuda" "-C" "linker-flavor=ptx" "--crate-type=rlib"
stdout: none
--- stderr -------------------------------
error: incorrect value `ptx` for codegen option `linker-flavor` - one of: gnu gnu-lld gnu-cc gnu-lld-cc darwin darwin-lld darwin-cc darwin-lld-cc wasm-lld wasm-lld-cc unix unix-cc msvc-lld msvc em-cc bpf llbc gcc ld ld.lld ld64.lld lld-link wasm-ld em  was expected
------------------------------------------

---- [ui] tests/ui/linkage-attr/unstable-flavor.rs#ptx stdout end ----

failures:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc O-NVPTX Target: the NVPTX LLVM backend for running rust on GPUs, https://llvm.org/docs/NVPTXUsage.html S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracking issue for MCP 990: Removing the unstable ptx linker flavor

4 participants