mirror of
https://github.com/servo/servo.git
synced 2025-06-28 19:13:41 +01:00
mach: explicitly install the toolchain and target in ensure_bootstrapped
This commit is contained in:
parent
855601ebb4
commit
e96bcea669
1 changed files with 7 additions and 5 deletions
|
@ -1006,13 +1006,15 @@ install them, let us know by filing a bug!")
|
|||
|
||||
if self.config["tools"]["use-rustup"]:
|
||||
self.ensure_rustup_version()
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue