aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2020-01-02 14:20:20 +0100
committerSimon Sapin <simon.sapin@exyr.org>2020-01-02 15:30:33 +0100
commite56e49e98fe4f0056c4f7915d9de6e998c056624 (patch)
treeb30e2c1ad01bebdf237c338605c6f8c7c1d297e4 /python/servo/command_base.py
parentcef92a2050fae29d7ae810da43d387ee57b00273 (diff)
downloadservo-e56e49e98fe4f0056c4f7915d9de6e998c056624.tar.gz
servo-e56e49e98fe4f0056c4f7915d9de6e998c056624.zip
mach: run `rustup target add` in `ensure_bootstrapped`
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 43e993f0907..e1edecd957a 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -1016,6 +1016,15 @@ install them, let us know by filing a bug!")
if "msvc" in target_platform:
Registrar.dispatch("bootstrap", context=self.context)
+ if target:
+ if self.config["tools"]["use-rustup"] and not "uwp" in target:
+ # '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",
+ "--toolchain", self.rust_toolchain(), target])
+
+
self.context.bootstrapped = True
def ensure_clobbered(self, target_dir=None):