Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap should be able to fully rely on RUSTC_WRAPPER #128383

Open
RalfJung opened this issue Jul 30, 2024 · 1 comment
Open

bootstrap should be able to fully rely on RUSTC_WRAPPER #128383

RalfJung opened this issue Jul 30, 2024 · 1 comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

RalfJung commented Jul 30, 2024

With rust-lang/cargo#13659, cargo now respects RUSTC_WRAPPER for all rustc invocations. So bootstrap should be able to set RUSTC to a non-existing binary and rely on RUSTC_WRAPPER for everything, which could simplift some logic.

See #127682 for what that could look like. However, this is currently blocked on rust-lang/libc#3772, and there are likely other components that also still use RUSTC (e.g. Miri and/or clippy might rely on it when running in x.py).

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 30, 2024
@jieyouxu jieyouxu added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 31, 2024
@RalfJung
Copy link
Member Author

RalfJung commented Oct 19, 2024

See #127682 for my latest attempt, that I just gave up on. The rabbit hole goes deep as all sorts of places assume there is a rustc binary they can directly invoke, rather than going through a wrapper. I stopped when I realized compiletest also makes that assumption.

This makes me wonder if it wouldn't be easier to make bootstrap/bin/rustc just always be RUSTC and never the wrapper. Why is it used as a wrapper in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants