Skip to content
Browse files

mach: explicitly install the toolchain and target in `ensure_bootstra…

  • Loading branch information
SimonSapin committed Jan 2, 2020
1 parent 855601e commit e96bcea669d9c21db8c0b171a6fe4582bbbd6144
Showing with 7 additions and 5 deletions.
  1. +7 −5 python/servo/
@@ -1006,13 +1006,15 @@ def ensure_bootstrapped(self, target=None):

if self.config["tools"]["use-rustup"]:
if target and "uwp" not in target:
# 'rustup target add' fails if the toolchain is not installed at all.
self.call_rustup_run(["rustc", "--version"])
toolchain = self.rust_toolchain()

check_call(["rustup" + BIN_SUFFIX, "target", "add",
"--toolchain", self.rust_toolchain(), target])
if toolchain not in check_output(["rustup", "toolchain", "list"]):
check_call(["rustup", "toolchain", "install", toolchain])

if target and "uwp" not in target and target not in check_output(
["rustup", "target", "list", "--installed", "--toolchain", toolchain]
check_call(["rustup", "target", "add", "--toolchain", toolchain, target])

self.context.bootstrapped = True

0 comments on commit e96bcea

Please sign in to comment.
You can’t perform that action at this time.