Files
rust/compiler/rustc_codegen_ssa
Jacob Pratt 1268eaa357 Rollup merge of #159211 - kulst:llbc-fix-debuginfo, r=nnethercote
Fix debuginfo argument when invoking LLBC linker

Previously LLBC's Linker implementation unconditionally added `--debug` to the linker invocation. This just became visible when 062ecd6 made LLBC no longer strip debug information unconditionally.

It is also common to use `cargo build --release` together with `-Zbuild-std=core` when targeting NVPTX. In this case the release profile will prevent all crates from embedding debug information in the first place. This additionally made the bug less visible.

This PR adds the proper logic to LLBC's linker implementation to only invoke LLBC with `--debug` when debug-information should not be stripped.

I did not add a regression test yet, since this would require to actually invoke the linker in `assembly-llvm`. As soon as https://github.com/rust-lang/rust/pull/157512 is merged and we have `assembly-output: linker-asm` available, I want to follow up on that.

cc: @kjetilkjeka
@rustbot label +O-NVPTX
2026-07-21 20:59:24 -04:00
..
2026-06-24 23:18:10 +01:00
…

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.