Skip to content

rustc: add support for split debuginfo#4092

Open
slackito wants to merge 6 commits into
bazelbuild:mainfrom
slackito:split-debug-info
Open

rustc: add support for split debuginfo#4092
slackito wants to merge 6 commits into
bazelbuild:mainfrom
slackito:split-debug-info

Conversation

@slackito

@slackito slackito commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

This is #3168 by @durin42, with fixes for some of the pre-merge checks.

This PR adapts the original change to support path mapping when passing -Zsplit-dwarf-out-dir=<path>. In order to do this, it adds to construct_arguments the option to pass (format_string, File) as elements in the list form of rustc_flags. This PR also adds tests for the new functionality.

The new changes on top of the original PR were written with assistance by Gemini.

@slackito slackito force-pushed the split-debug-info branch 2 times, most recently from 5dd4ee1 to b9fc501 Compare June 29, 2026 09:26
durin42 and others added 6 commits June 29, 2026 15:36
This requires some helper logic in the process wrapper so we can move
dwo files to predictable output locations, but otherwise it's mostly
straightforward. This requires a bazel built after
d2c79821cd45b30eeaec2efc3bd5fbd26f37d3c2, but that's old enough it
landed in bazel 8.
The `rust_flags` argument in `construct_arguments` now supports
(format_string, File) tuples as elements in addition to strings, when
using the list format. This allows bazel to apply path mapping on the
dwarf output directory flag.

Also added analysis tests for `--fission=yes` and `--fission=no`. The
test cases were written by Gemini and reviewed by me.

Assisted-by: Gemini
Fission support requires passing `-Zsplit-dwarf-out-dir` which is not
available in stable rustc.
@slackito

Copy link
Copy Markdown
Collaborator Author

Rebased on top of current main.

@slackito slackito marked this pull request as ready for review June 29, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants