mirror of
https://github.com/servo/servo.git
synced 2025-06-29 03:23: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"]:
|
if self.config["tools"]["use-rustup"]:
|
||||||
self.ensure_rustup_version()
|
self.ensure_rustup_version()
|
||||||
if target and "uwp" not in target:
|
toolchain = self.rust_toolchain()
|
||||||
# 'rustup target add' fails if the toolchain is not installed at all.
|
|
||||||
self.call_rustup_run(["rustc", "--version"])
|
|
||||||
|
|
||||||
check_call(["rustup" + BIN_SUFFIX, "target", "add",
|
if toolchain not in check_output(["rustup", "toolchain", "list"]):
|
||||||
"--toolchain", self.rust_toolchain(), target])
|
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
|
self.context.bootstrapped = True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue