Closed
Description
This is a tracking issue for the -Zdwarf-version
unstable flag (no RFC/MCP) added in #98350 which allows selecting the specific version of DWARF to use when creating debuginfo.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Initial implementation (Implement support for DWARF version 5. #98350)Wider Testing (tested on RfL)Adjust documentation (see instructions on rustc-dev-guide) (Stabilize
-Zdwarf-version
as-Cdwarf-version
#136926)Stabilization PR (see instructions on rustc-dev-guide) (Stabilize-Zdwarf-version
as-Cdwarf-version
#136926)
Unresolved Questions
- Is the pre-compiled standard library (potentially) using a different version of DWARF an issue?What should the behavior of the flag do when the active target does not use DWARF?
Implementation history
- Initial implementation: Implement support for DWARF version 5. #98350
- Stop emitting
.debug_pubnames
and.debug_pubtypes
when using DWARF 5 fix: stop emitting.debug_pubnames
and.debug_pubtypes
#117962 - Refactoring & cleanups Clean up uses of the unstable
dwarf_version
option #135739 - Fix LLVM warning on LTO with different DWARF versions Pick the max DWARF version when LTO'ing modules with different versions #136659
- Improve argument validation Emit an error if
-Zdwarf-version=1
is requested #136746
Metadata
Metadata
Assignees
Labels
Unstable option: set dwarf versionArea: Command-line interface (CLI) to the compilerCategory: An issue tracking the progress of sth. like the implementation of an RFCStatus: This needs a clear design proposal and then a meeting with the team.Relevant to the compiler team, which will review and decide on the PR/issue.
Activity
thomcc commentedon Nov 10, 2022
Ideally this design proposal would include some method of exposing it to cargo build scripts, so crates like
cc
would be able to use the right version of DWARF (see rust-lang/cc-rs#694, for example, where we hardcode decisions compatible with rustc)Wyvern commentedon Feb 3, 2023
Is there a unstable way to opt-in DWARF5 for Rust now?
Tried
-Zdwarf-version=5
in macOS, but seems failed.kbuild: rust: use `-Zdwarf-version` to support DWARFv5
kbuild: rust: use `-Zdwarf-version` to support DWARFv5
kbuild: rust: use `-Zdwarf-version` to support DWARFv5
kbuild: rust: use `-Zdwarf-version` to support DWARFv5
kbuild: rust: use `-Zdwarf-version` to support DWARFv5
kbuild: rust: use `-Zdwarf-version` to support DWARFv5
kbuild: rust: use `-Zdwarf-version` to support DWARFv5
6 remaining items
Unrolled build for rust-lang#135739
Rollup merge of rust-lang#136659 - wesleywiser:dwarf_version_lto_merg…
-Zdwarf-version=1
is requested #136746Rollup merge of rust-lang#136746 - wesleywiser:err_dwarf1, r=Urgau
Rollup merge of rust-lang#136659 - wesleywiser:dwarf_version_lto_merg…
Rollup merge of rust-lang#136659 - wesleywiser:dwarf_version_lto_merg…
Unrolled build for rust-lang#136659
Rollup merge of rust-lang#136746 - wesleywiser:err_dwarf1, r=Urgau
Unrolled build for rust-lang#136746
-Zdwarf-version
as-Cdwarf-version
#136926Rollup merge of rust-lang#136926 - wesleywiser:stabilize_dwarf-versio…
Auto merge of rust-lang#136926 - wesleywiser:stabilize_dwarf-version,…