aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/command_base.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 016022c6c41..01dac1ca7fb 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -799,16 +799,20 @@ class CommandBase(object):
return
servo.platform.get().passive_bootstrap()
+ self.context.bootstrapped = True
+
+ # Toolchain installation is handled automatically for non cross compilation builds.
+ if not self.target.is_cross_build():
+ return
- needs_toolchain_install = self.target.triple() not in \
- check_output(["rustup", "target", "list", "--installed"],
- cwd=self.context.topdir).decode()
- if needs_toolchain_install:
+ installed_targets = check_output(
+ ["rustup", "target", "list", "--installed"],
+ cwd=self.context.topdir
+ ).decode()
+ if self.target.triple() not in installed_targets:
check_call(["rustup", "target", "add", self.target.triple()],
cwd=self.context.topdir)
- self.context.bootstrapped = True
-
def ensure_rustup_version(self):
try:
version_line = subprocess.check_output(