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 }})

wesleywiser

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

@rustbot

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 rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jan 20, 2025

@rustbot

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@wesleywiser

@wesleywiser

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.

@jieyouxu

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.

@lqd

@bors

📌 Commit 0b24fc9 has been approved by lqd

It is now in the queue for this repository.

@bors 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

Jan 22, 2025

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jan 22, 2025

@matthiaskrgr

…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

Jan 23, 2025

@bors

…iaskrgr

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

jhpratt added a commit to jhpratt/rust that referenced this pull request

Jan 23, 2025

@jhpratt

…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

Jan 23, 2025

@jieyouxu

…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

Jan 23, 2025

@bors

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jan 23, 2025

@bors

…iaskrgr

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

@Andarwinux

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.

@mati865

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

A-debuginfo

Area: Debugging information in compiled programs (DWARF, PDB, etc.)

O-windows-gnu

Toolchain: GNU, Operating system: Windows

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.