weihanglo · GitHub

@weihanglo

With `-Zroot-dir`,
rustc runs from the specified root dir,
so its working directory is not covered by workspace remap rule
This was found during the experiment of rust-lang/cargo 17309
Previously we said that keeping `<ws-root> -> .` unremap record in the
unremap file will make debugger harder to apply them without conflicts.
This is true, but other remap rules may also get conflict.
Say, you have a dylib that has a generated rust code under a different
`build.build-dir`, so now your `/cargo/build-dir` needs to unremap to
two different locations.
To make things simpler, let's just add the workspace remap and make
unremap records consistent.
With `-Zroot-dir`,
rustc runs from the specified root dir,
so its working directory is not covered by workspace remap rule
This was found during the experiment of rust-lang#17309
bootstrap invokes cargo with `-Zroot-dir={src}`,
and std started leaking checkout path from there.

@weihanglo

Open

18 tasks

@epage

@weihanglo

Merged

rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request

Aug 11, 2026

Open

Read the original on github.com ↗