-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
refactor fn bootstrap::builder::Builder::compiler_for
logic
#109295
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
r? @jyn514 |
fn bootstrap::builder::Builder::compiler_for
fn bootstrap::builder::Builder::compiler_for
logic
I don't have time for reviews, sorry. |
I think Mark is quite busy too. Can you review this ? @albertlarsan68 |
src/bootstrap/builder.rs
Outdated
@@ -919,7 +919,7 @@ impl<'a> Builder<'a> { | |||
host: TargetSelection, | |||
target: TargetSelection, | |||
) -> Compiler { | |||
if self.build.force_use_stage2() { | |||
if self.build.force_use_stage2(Compiler { stage, host }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer that we avoid creating Compiler structs if they don't correspond to an already-built compiler (i.e., the only constructor should be self.compiler
).
Can we refactor both force_use functions to take stage and host as separate values?
r=me with nit fixed I'm generally not sure this is the right logic - the force-use functions feel pretty iffy to me - but I'm OK patching it for now. |
- check compiler stage before forcing for stage2. - check if download_rustc is not set before forcing for stage1. Signed-off-by: ozkanonur <work@onurozkan.dev>
3babf34
to
2ec7f6c
Compare
@Mark-Simulacrum fixed |
@bors r+ rollup |
refactor `fn bootstrap::builder::Builder::compiler_for` logic - check compiler stage before forcing for stage2. - check if download_rustc is not set before forcing for stage1. resolves rust-lang#109286
refactor `fn bootstrap::builder::Builder::compiler_for` logic - check compiler stage before forcing for stage2. - check if download_rustc is not set before forcing for stage1. resolves rust-lang#109286
Rollup of 11 pull requests Successful merges: - rust-lang#100311 (Fix handling of trailing bare CR in str::lines) - rust-lang#108997 (Change text -> rust highlighting in sanitizer.md) - rust-lang#109179 (move Option::as_slice to intrinsic) - rust-lang#109187 (Render source page layout with Askama) - rust-lang#109280 (Remove `VecMap`) - rust-lang#109295 (refactor `fn bootstrap::builder::Builder::compiler_for` logic) - rust-lang#109312 (rustdoc: Cleanup parent module tracking for doc links) - rust-lang#109317 (Update links for custom discriminants.) - rust-lang#109405 (RPITITs are `DefKind::Opaque` with new lowering strategy) - rust-lang#109414 (Do not consider synthesized RPITITs on missing items checks) - rust-lang#109435 (Detect uninhabited types early in const eval) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
resolves #109286