diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/servo/command_base.py | 9 | ||||
-rw-r--r-- | python/servo/devenv_commands.py | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index f8c1bcb0610..f42a36fc738 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -1009,7 +1009,12 @@ install them, let us know by filing a bug!") toolchain = self.rust_toolchain() if toolchain not in check_output(["rustup", "toolchain", "list"]): - check_call(["rustup", "toolchain", "install", toolchain]) + check_call(["rustup", "toolchain", "install", "--profile", "minimal", toolchain]) + + if "rustc-dev" not in check_output( + ["rustup", "component", "list", "--installed", "--toolchain", toolchain] + ): + check_call(["rustup", "component", "add", "--toolchain", toolchain, "rustc-dev"]) if target and "uwp" not in target and target not in check_output( ["rustup", "target", "list", "--installed", "--toolchain", toolchain] @@ -1029,7 +1034,7 @@ install them, let us know by filing a bug!") return 1 raise version = tuple(map(int, re.match(b"rustup (\d+)\.(\d+)\.(\d+)", version_line).groups())) - if version < (1, 11, 0): + if version < (1, 21, 0): print("rustup is at version %s.%s.%s, Servo requires 1.11.0 or more recent." % version) print("Try running 'rustup self update'.") return 1 diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index 658ef547f21..bc715205523 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -24,7 +24,7 @@ from mach.decorators import ( Command, ) -from servo.command_base import CommandBase, cd, call, BIN_SUFFIX +from servo.command_base import CommandBase, cd, call from servo.build_commands import notify_build_done from servo.util import get_static_rust_lang_org_dist, get_urlopen_kwargs @@ -213,7 +213,7 @@ class MachCommands(CommandBase): filename = path.join(self.context.topdir, "rust-toolchain") with open(filename, "w") as f: f.write(toolchain + "\n") - return call(["rustup" + BIN_SUFFIX, "component", "add", "rustc-dev"]) + self.ensure_bootstrapped() @Command('fetch', description='Fetch Rust, Cargo and Cargo dependencies', |