Skip to content

2024: Decrease debuginfo generated by -Cdebuginfo=1 #613

Closed as not planned
Closed as not planned
@jyn514

Description

Proposal

In the 2024 edition, change -C debuginfo=1 from being an alias for -C debuginfo=limited to an alias for -C debuginfo=line-tables-only.

For a long time, the available debuginfo options have been debuginfo=0, 1, or 2. The documentation said that 0 meant no debuginfo, 1 meant line tables, and 2 meant full debuginfo. Unfortunately that wasn't quite true - debuginfo=1 also generated full debuginfo for the module as well as line tables, which in some cases (e.g. rust-lang/rust#104968 (comment)) more than doubled the size of the debuginfo.

Due to backwards compat concerns, I added a new option, -C debuginfo=line-tables-only to decrease the debuginfo further, rather than changing the meaning of the existing flag (rust-lang/rust#109808, rust-lang/cargo#11958). I think this is in nearly all cases the intended meaning of the flag. I would like to make -C debuginfo=1 mean debuginfo=line-tables-only in the 2024 edition, which both gives people plenty of time to hear about the change and means that it's opt-in rather than breaking.

Mentors or Reviewers

I'm happy to mentor this work myself, the code itself should be fairly simple.

Process

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

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however, you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

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.

Metadata

Assignees

No one assigned

    Labels

    T-compilerAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions