aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorDaniel Robertson <danlrobertson89@gmail.com>2016-02-11 18:02:26 -0500
committerDaniel Robertson <danlrobertson89@gmail.com>2016-02-12 14:58:08 -0500
commit0df4118db9da4d44d79109f6d441f66200efb0bf (patch)
tree5257192784d9049f48be413e5a67bddab5f20ed3 /python/servo/command_base.py
parent0b27807ad4229a07ba6e04aa59798af50da60c14 (diff)
downloadservo-0df4118db9da4d44d79109f6d441f66200efb0bf.tar.gz
servo-0df4118db9da4d44d79109f6d441f66200efb0bf.zip
Download extra std lib when cross-compiling #9557
Split ensure_bootstrap into two phases including a phase checking the compiler, and a phase checking for target libraries.
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 450403e903b..d43c3ab4eda 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -394,18 +394,21 @@ class CommandBase(object):
def android_build_dir(self, dev):
return path.join(self.get_target_dir(), "arm-linux-androideabi", "debug" if dev else "release")
- def ensure_bootstrapped(self):
+ def ensure_bootstrapped(self, targets=[]):
if self.context.bootstrapped:
return
Registrar.dispatch("update-submodules", context=self.context)
if not self.config["tools"]["system-rust"] and \
- not path.exists(path.join(
- self.config["tools"]["rust-root"], "rustc", "bin", "rustc" + BIN_SUFFIX)):
+ (not path.exists(path.join(
+ self.config["tools"]["rust-root"], "rustc", "bin", "rustc" + BIN_SUFFIX)) or
+ not all([path.exists(path.join(
+ self.config["tools"]["rust-root"], "rustc", "lib", "rustlib", x
+ )) for x in targets])):
print("looking for rustc at %s" % path.join(
self.config["tools"]["rust-root"], "rustc", "bin", "rustc" + BIN_SUFFIX))
- Registrar.dispatch("bootstrap-rust", context=self.context)
+ Registrar.dispatch("bootstrap-rust", context=self.context, target=targets)
if not self.config["tools"]["system-cargo"] and \
not path.exists(path.join(
self.config["tools"]["cargo-root"], "cargo", "bin", "cargo" + BIN_SUFFIX)):