cargo run
doesn't rebuild bootstrap binaries
#95141
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-help-wanted
Call for participation: Help is requested to fix this issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Uh oh!
There was an error while loading. Please reload this page.
Currently,
cargo run
has a big footgun: if you modifysrc/bootstrap/bin/rustc.rs
(or rustdoc.rs), it won't be rebuilt until you manually runcargo build --bins
. I tried avoiding this in #94828 by running that automatically in bootstrap, but it discards various linker arguments and environment variables that prevent people from configuring the build.A better solution is to introduce a binary that dispatches to different main functions, like rustup. If called as
bootstrap
it would run the main builder; if called asrustc
orrustdoc
it would run the logic currently inrustc.rs
/rustdoc.rs
; if called by any other name it should give a hard error.cc #94828 (comment), #94829
I am happy to help mentor this work.
@rustbot label: +A-rustbuild +C-enhancement +E-mentor +E-help-wanted
The text was updated successfully, but these errors were encountered: