LLBC-linker and NVPTX: do not strip debug when PTX ISA version >= 7.0#147672
LLBC-linker and NVPTX: do not strip debug when PTX ISA version >= 7.0#147672kjetilkjeka wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
|
@rustbot label +O-NVPTX |
|
@RDambrosio016, can you take a look as the other target maintainer for nvptx? |
|
@Mark-Simulacrum I see that you swapped the waiting for labels. If this is related to waiting for @RDambrosio016 I don't expect him to check in here. It seems like he's not been checking notifications related to rust-lang for a while. Is there anything I can do to make progress on this PR? |
This was an issue for old ptx ISA versions. Those are not supported by rustc anymore
ddbcae9 to
874fb5f
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
We do not support ptx isa older than 7.0 anymore and AFAIK LLVM will produce valid debug symbols for that version and more recent. That means no special case is needed to remove the stripping of debug symbol hack and that should make this PR a pure improvement. Maybe you would consider adopting the review part of it @ZuseZ4 ? Or maybe this is outside the domain of the compiler team? |
| let mut passes = format!("default<{}>", optimization); | ||
|
|
||
| // FIXME(@kjetilkjeka) Debug symbol generation is broken for nvptx64 so we must remove them even in debug mode | ||
| if debug && self.target == crate::Target::Nvptx64NvidiaCuda { |
There was a problem hiding this comment.
Can you add a test to check for some of those debug symbols?
|
Nice range-dif. Edition 2024 seems fine, other tools also require it. |
Related to #99248
With the version bump of llvm happening a while back it's possible to not strip debug symbols in llbc-linker for the nvptx target in a lot of useful cases.
Instead of always stripping for nvptx64 the new behavior is to look at
target-featureandtarget-cpuand strip for combinations that produce old enough ptx isa version to trigger the bug.