Skip to content

Remap both absolute and relative paths when building rustc and std#150283

Merged
bors merged 2 commits intorust-lang:mainfrom
Urgau:remap-debuginfo-absolute
Dec 24, 2025
Merged

Remap both absolute and relative paths when building rustc and std#150283
bors merged 2 commits intorust-lang:mainfrom
Urgau:remap-debuginfo-absolute

Conversation

@Urgau
Copy link
Copy Markdown
Member

@Urgau Urgau commented Dec 22, 2025

Turns out #150110 didn't work as expected, because when the standard library sources are present, we helpfully un-remap the paths to the local directory of the user, including when we are building the compiler and standard library it-self (duh!), and since those paths are absolute (not relative), our purely relative remapping didn't pick them up.

This behavior wasn't a issue before because the un-remap logic immediately tries to remap them again, and since we had the absolute remapping we would just remap them to the the same thing.

To fix that issue I've adjusted our remapping to remap both the absolute and relative paths when building rustc and std, as well as added a run-make to make sure we don't regress it again (with a new needs-std-remap-debuginfo directive).

r? @jieyouxu

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

7 participants