-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-clippyArea: ClippyArea: ClippyA-miriArea: The miri toolArea: The miri toolA-rustfmtArea: RustfmtArea: RustfmtE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Description
This code hard-codes the default sysroot to be "one path above the binary":
rust/compiler/rustc_session/src/filesearch.rs
Lines 128 to 131 in a3d7a5e
let mut p = canonicalize(exe); | |
p.pop(); | |
p.pop(); | |
p |
That doesn't work for Miri, which is why it needs various hacks around sysroot (also copied in clippy and rustfmt). We should make the default sysroot configurable in rustc_driver so tools can stop using this hack.
cc #97443, @flip1995, @calebcartwright
Originally posted by @RalfJung in #78926 (comment)
RalfJung
Metadata
Metadata
Assignees
Labels
A-clippyArea: ClippyArea: ClippyA-miriArea: The miri toolArea: The miri toolA-rustfmtArea: RustfmtArea: RustfmtE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.