-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustbuild: Fix the --build argument to bootstrap.py #43384
rustbuild: Fix the --build argument to bootstrap.py #43384
Conversation
This makes the --build argument also apply for the downloading of the stage0 toolchain and building rustbuild. Fixes rust-lang#42116
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for the hard work, @segevfiner! We'll get someone top-notch to review this shortly! /cc @Mark-Simulacrum who is also working in rustbuild world |
@@ -669,7 +670,7 @@ def bootstrap(): | |||
rb.update_submodules() | |||
|
|||
# Fetch/build the bootstrap | |||
rb.build = rb.build_triple() | |||
rb.build = args.build or rb.build_triple() |
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.
It feels like this should be inside build_triple itself, but presumably it might not have access to args today? Not sure.
cc @aidanhs, this affects python bootstrap
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.
It doesn't have access. The command line is handled in the bootstrap()
function. The parsed args
, or stuff derived from them, are set as attributes of the RustBuild
object.
The fix looks reasonable, but I'm tempted to instead propose that we just remove that piece of documentation and make it configured by the config file. Seems a little odd for @segevfiner, what do you think about just altering the toml? Or, alternatively, I assume you can pass an argument to configure to set this? (or if you can't, you should be able to!) Just want to understand the use-case. |
@aidanhs
If it's decided this should not be supported, it should probably removed entirely from rustbuild (It appears in |
Gotcha, so supporting it here is required if we want to support that flag on rustbuild. Thanks for explaining :) I'm suspicious that there are more edge cases here that aren't handled correctly, but clearly this is a step forward so I'm happy. Any comments from a rustbuild perspective @Mark-Simulacrum? |
I don't think so. It seems good to handle |
Thinking about it briefly, I agree - no flags spring to mind as additional cases that should be considered, but I'll look through all the possible flags tomorrow. In the meantime... @bors r+ |
📌 Commit c41ac2e has been approved by |
…anhs rustbuild: Fix the --build argument to bootstrap.py This makes the --build argument also apply for the downloading of the stage0 toolchain and building rustbuild. Fixes #42116
☀️ Test successful - status-appveyor, status-travis |
This makes the --build argument also apply for the downloading of the stage0 toolchain and building rustbuild.
Fixes #42116