mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-27 16:07:46 +00:00
Auto merge of #150283 - Urgau:remap-debuginfo-absolute, r=jieyouxu
Remap both absolute and relative paths when building `rustc` and `std`
Turns out [#150110](https://github.com/rust-lang/rust/issues/150110) didn't work as expected, because when the standard library sources are present, we [helpfully un-remap the paths](e951f470d7/compiler/rustc_metadata/src/rmeta/decoder.rs (L1656-L1702)) 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`
This commit is contained in:
commit
fe2cf3fa56