-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
cargo run doesn't rebuild bootstrap binaries #95141
Copy link
Copy link
Closed as not planned
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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)
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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)
Type
Fields
Give feedbackNo fields configured for issues without a type.
Currently,
cargo runhas 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
bootstrapit would run the main builder; if called asrustcorrustdocit 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