diff options
author | Mátyás Mustoha <mmatyas@inf.u-szeged.hu> | 2016-04-29 22:39:32 +0200 |
---|---|---|
committer | Mátyás Mustoha <mmatyas@inf.u-szeged.hu> | 2016-05-05 12:17:36 +0200 |
commit | 200af79c4b3bf43ad3422f5fc2a3b8e972b833ea (patch) | |
tree | 5e07b95c6db00e2dbb220c080b9ead29444acd2e /python/servo/command_base.py | |
parent | 319f520e4df2d1d904d57259b54bfa9e5e504f06 (diff) | |
download | servo-200af79c4b3bf43ad3422f5fc2a3b8e972b833ea.tar.gz servo-200af79c4b3bf43ad3422f5fc2a3b8e972b833ea.zip |
Improve build target argument handling
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 9f2bf307c9d..1623c8fc41f 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -411,7 +411,7 @@ 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, targets=[]): + def ensure_bootstrapped(self, target=None): if self.context.bootstrapped: return @@ -422,13 +422,14 @@ class CommandBase(object): rustc_binary_exists = path.exists(rustc_path) base_target_path = path.join(rust_root, "rustc", "lib", "rustlib") - target_paths = [path.join(base_target_path, t) for t in targets] - all_targets_exist = all([path.exists(p) for p in target_paths]) + target_exists = True + if target is not None: + target_path = path.join(base_target_path, target) + target_exists = path.exists(target_path) - if (not self.config['tools']['system-rust'] and - (not rustc_binary_exists or not all_targets_exist)): + if not (self.config['tools']['system-rust'] or (rustc_binary_exists and target_exists)): print("looking for rustc at %s" % (rustc_path)) - Registrar.dispatch("bootstrap-rust", context=self.context, target=targets) + Registrar.dispatch("bootstrap-rust", context=self.context, target=filter(None, [target])) cargo_path = path.join(self.config["tools"]["cargo-root"], "cargo", "bin", "cargo" + BIN_SUFFIX) |