Skip to content

Make the default sysroot configurable by rustc_private tools #98832

Closed
@jyn514

Description

@jyn514

This code hard-codes the default sysroot to be "one path above the binary":

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)

Metadata

Metadata

Assignees

Labels

A-clippyArea: ClippyA-miriArea: The miri toolA-rustfmtArea: RustfmtE-help-wantedCall for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions