Update windows-gnu targets to set DebuginfoKind::DWARF
by wesleywiser · Pull Request #135790 · rust-lang/rust (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation9 Commits2 Checks6 Files changed
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
These targets have always used DWARF debuginfo and not CodeView/PDB debuginfo like the MSVC Windows targets. However, their target definitions claim to use DebuginfoKind::PDB
probably to ensure that we do not try to allow the use of split-DWARF debuginfo.
This does not appear to be necessary since the targets set their supported split debug info to Off
. I've looked at all of the uses of these properties and this patch does not appear to cause any functional changes in compiler behavior. I also added UI tests to attempt to validate there is no change in the behavior of these options on stable compilers.
cc @mati865 since you mentioned this in #135739
cc @davidtwco for split-dwarf
r? @fmease
rustbot has assigned @fmease.
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
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
This comment has been minimized.
This comment has been minimized.
These targets have always generated DWARF debuginfo and not CodeView/PDB debuginfo like the MSVC Windows targets. Correct their target definitions to reflect this.
The newly added tests for the various combinations of *-windows-gnu*
targets and
-Csplit-debuginfo
show that this does not change any stable behavior.
FWIW, I also added -Zunstable-options
gating check for -Csplit-debuginfo=...
next doors over at #135572 for msvc but did not for windows-gnu, also cc #135531.
+1 for this change, I expected windows-gnu to be using DWARF, but I didn't add any checks for windows-gnu in the other PR because I didn't really feel like testing it. This certainly aligns better with what I expected.
📌 Commit 0b24fc9 has been approved by lqd
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…uginfokind, r=lqd
Update windows-gnu targets to set DebuginfoKind::DWARF
These targets have always used DWARF debuginfo and not CodeView/PDB debuginfo like the MSVC Windows targets. However, their target definitions claim to use DebuginfoKind::PDB
probably to ensure that we do not try to allow the use of split-DWARF debuginfo.
This does not appear to be necessary since the targets set their supported split debug info to Off
. I've looked at all of the uses of these properties and this patch does not appear to cause any functional changes in compiler behavior. I also added UI tests to attempt to validate there is no change in the behavior of these options on stable compilers.
cc @mati865
since you mentioned this in rust-lang#135739
cc @davidtwco
for split-dwarf
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#131282 (std: detect stack overflows in TLS destructors on UNIX)
- rust-lang#134746 (Don't ICE in coerce when autoderef fails to structurally normalize non-WF type in new solver)
- rust-lang#135790 (Update windows-gnu targets to set
DebuginfoKind::DWARF
) - rust-lang#135878 (ci: use 8 core arm runner for dist-aarch64-linux)
- rust-lang#135879 (fix outdated file path ref in llvm)
- rust-lang#135883 (Remove erroneous
unsafe
inBTreeSet::upper_bound_mut
) - rust-lang#135884 (remove implied end of slice)
- rust-lang#135898 (rustdoc-json-types: Finalize dyn compatibility renaming)
r? @ghost
@rustbot
modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request
…uginfokind, r=lqd
Update windows-gnu targets to set DebuginfoKind::DWARF
These targets have always used DWARF debuginfo and not CodeView/PDB debuginfo like the MSVC Windows targets. However, their target definitions claim to use DebuginfoKind::PDB
probably to ensure that we do not try to allow the use of split-DWARF debuginfo.
This does not appear to be necessary since the targets set their supported split debug info to Off
. I've looked at all of the uses of these properties and this patch does not appear to cause any functional changes in compiler behavior. I also added UI tests to attempt to validate there is no change in the behavior of these options on stable compilers.
cc @mati865
since you mentioned this in rust-lang#135739
cc @davidtwco
for split-dwarf
jieyouxu added a commit to jieyouxu/rust that referenced this pull request
…uginfokind, r=lqd
Update windows-gnu targets to set DebuginfoKind::DWARF
These targets have always used DWARF debuginfo and not CodeView/PDB debuginfo like the MSVC Windows targets. However, their target definitions claim to use DebuginfoKind::PDB
probably to ensure that we do not try to allow the use of split-DWARF debuginfo.
This does not appear to be necessary since the targets set their supported split debug info to Off
. I've looked at all of the uses of these properties and this patch does not appear to cause any functional changes in compiler behavior. I also added UI tests to attempt to validate there is no change in the behavior of these options on stable compilers.
cc @mati865
since you mentioned this in rust-lang#135739
cc @davidtwco
for split-dwarf
bors added a commit to rust-lang-ci/rust that referenced this pull request
Rollup of 10 pull requests
Successful merges:
- rust-lang#134746 (Don't ICE in coerce when autoderef fails to structurally normalize non-WF type in new solver)
- rust-lang#135552 ([AIX] Lint on structs that have a different alignment in AIX's C ABI)
- rust-lang#135764 (Fix tests on LLVM 20)
- rust-lang#135779 (CI: free disk on linux arm runner)
- rust-lang#135790 (Update windows-gnu targets to set
DebuginfoKind::DWARF
) - rust-lang#135879 (fix outdated file path ref in llvm)
- rust-lang#135883 (Remove erroneous
unsafe
inBTreeSet::upper_bound_mut
) - rust-lang#135884 (remove implied end of slice)
- rust-lang#135887 (improvements on
build_steps::test
implementation) - rust-lang#135898 (rustdoc-json-types: Finalize dyn compatibility renaming)
r? @ghost
@rustbot
modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 9 pull requests
Successful merges:
- rust-lang#134746 (Don't ICE in coerce when autoderef fails to structurally normalize non-WF type in new solver)
- rust-lang#135552 ([AIX] Lint on structs that have a different alignment in AIX's C ABI)
- rust-lang#135779 (CI: free disk on linux arm runner)
- rust-lang#135790 (Update windows-gnu targets to set
DebuginfoKind::DWARF
) - rust-lang#135879 (fix outdated file path ref in llvm)
- rust-lang#135883 (Remove erroneous
unsafe
inBTreeSet::upper_bound_mut
) - rust-lang#135884 (remove implied end of slice)
- rust-lang#135887 (improvements on
build_steps::test
implementation) - rust-lang#135898 (rustdoc-json-types: Finalize dyn compatibility renaming)
r? @ghost
@rustbot
modify labels: rollup
Why does this affect gnullvm? clang/lld fully supports codeview and pdb. Is that the style of rust? No options for the user at all, just random PRs to make decisions for users at random.
Gnullvm uses Dwarf debuginfo by default. This is in line with Clang. If you want to generate .pdb files, you can add --pdb argument to the linker invocation.
Note that this PR doesn't change the outcome.
It only paved the way to removing an old hack that chose debuginfo format based on the is_like_msvc
field. Before this (and subsequent) PRs, there was no way to change debuginfo format in the spec. Therefore, it is an improvement after all.
This was referenced
Apr 4, 2025
Labels
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Toolchain: GNU, Operating system: Windows
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the compiler team, which will review and decide on the PR/issue.