Fix debuginfo argument when invoking LLBC linker#159211
Open
kulst wants to merge 1 commit into
Open
Conversation
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. Add the proper logic to LLBC's linker implementation to only invoke LLBC with `--debug` when debug-information should not be stripped.
Collaborator
|
r? @mu001999 rustbot has assigned @mu001999. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
Makes sense to me, but I'm not familiar with LLBC, so @rustbot reroll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously LLBC's Linker implementation unconditionally added
--debugto 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 --releasetogether with-Zbuild-std=corewhen 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
--debugwhen 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 #157512 is merged and we haveassembly-output: linker-asmavailable, I want to follow up on that.cc: @kjetilkjeka
@rustbot label +O-NVPTX