Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up uses of the unstable dwarf_version option #135739

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wesleywiser
Copy link
Member

  • Consolidate calculation of the effective value.
  • Check the target DebuginfoKind instead of using is_like_msvc.
  • Add the tracking issue to the unstable book page for this feature.

cc #103057

@rustbot
Copy link
Collaborator

rustbot commented Jan 19, 2025

r? @chenyukang

rustbot has assigned @chenyukang.
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 19, 2025
@wesleywiser wesleywiser force-pushed the dwarf_version_handling branch from 89c7fcc to a9fae0d Compare January 19, 2025 20:59
@wesleywiser wesleywiser changed the title Clean up uses of the unstable dwarf_verison option Clean up uses of the unstable dwarf_version option Jan 19, 2025
@lqd
Copy link
Member

lqd commented Jan 19, 2025

Sweet, r? lqd and r=me with a tiny doc comment and green CI. Thanks!

@rustbot rustbot assigned lqd and unassigned chenyukang Jan 19, 2025
- Consolidate calculation of the effective value.
- Check the target `DebuginfoKind` instead of using `is_like_msvc`.
@wesleywiser wesleywiser force-pushed the dwarf_version_handling branch from a9fae0d to 26c10d0 Compare January 19, 2025 22:02
@mati865
Copy link
Contributor

mati865 commented Jan 20, 2025

I think this might break windows-gnu targets. Their spec for some reason states pdb debuginfo but they use dwarf. Previously this was handled by is_like_msvc.

debuginfo_kind: DebuginfoKind::Pdb,

@wesleywiser
Copy link
Member Author

Thanks for pointing that out! That seems super weird. I'll look into that tomorrow.

@lqd
Copy link
Member

lqd commented Jan 20, 2025

Weird.

We should document that in both cg_llvm and the target specs themselves. And/or maybe the centralization should be in rustc_target/TargetOptions (but made available via the Session if you still want to, without that logic), since it's both target-specific and has subtle rules (that can contradict the spec fields).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants