rust-lang / compiler-team

A home for compiler team planning documents, meeting minutes, and other such things.
https://rust-lang.github.io/compiler-team/
Apache License 2.0
383 stars 67 forks source link

Add `-Z embed-source` (DWARFv5 source code embedding extension) #764

Open Mrmaxmeier opened 1 week ago

Mrmaxmeier commented 1 week ago

Proposal

DWARFv5 has an extension for embedding program source code directly into the debug info sections: https://dwarfstd.org/issues/180201.1.html

LLVM implements this extension, though it currently uses a custom pre-standardization attribute opcode.

Clang supports it through a -gembed-source flag but Rust does not expose this feature at the moment.

Implementing this seems straight-forward (https://github.com/rust-lang/rust/pull/126985) but I'm not entirely sure how to deal with unsupported platforms.

Process

The main points of the Major Change Process are as follows:

You can read more about Major Change Proposals on forge.

rustbot commented 1 week ago

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

Concerns or objections to the proposal should be discussed on Zulip and formally registered here by adding a comment with the following syntax:

 @rustbot concern reason-for-concern 
 <description of the concern> 

Concerns can be lifted with:

 @rustbot resolve reason-for-concern 

See documentation at https://forge.rust-lang.org

cc @rust-lang/compiler @rust-lang/compiler-contributors