Skip to content

rustbuild: Fix the --build argument to bootstrap.py #43384

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

Merged
merged 1 commit into from
Jul 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ def update_submodules(self):
def bootstrap():
parser = argparse.ArgumentParser(description='Build rust')
parser.add_argument('--config')
parser.add_argument('--build')
parser.add_argument('--clean', action='store_true')
parser.add_argument('-v', '--verbose', action='store_true')

Expand Down Expand Up @@ -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()
Copy link
Member

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

Copy link
Contributor Author

@segevfiner segevfiner Jul 21, 2017

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.

rb.download_stage0()
sys.stdout.flush()
rb.build_bootstrap()
Expand Down