aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/build_commands.py
diff options
context:
space:
mode:
authorJinank Jain <ug201210017@iitj.ac.in>2015-05-14 21:52:23 +0200
committerJinank Jain <ug201210017@iitj.ac.in>2015-05-14 21:52:23 +0200
commit8af4e100864d9b4a665c7dbf86d6f2b63224ffb9 (patch)
treea2a440967c63b790255f657da7e37e957bfa1324 /python/servo/build_commands.py
parent8faa9f877df67ad6bced9b5ec4ae580c042bfa45 (diff)
downloadservo-8af4e100864d9b4a665c7dbf86d6f2b63224ffb9.tar.gz
servo-8af4e100864d9b4a665c7dbf86d6f2b63224ffb9.zip
Fixed #6048
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r--python/servo/build_commands.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index 1f5cdd3350d..42599bd6766 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -137,11 +137,22 @@ class MachCommands(CommandBase):
opts = params or []
features = []
+ base_path = path.join("components", "servo", "target")
+ release_path = path.join(base_path, "release", "servo")
+ dev_path = path.join(base_path, "debug", "servo")
+
+ release_exists = path.exists(release_path)
+ dev_exists = path.exists(dev_path)
+
if not (release or dev):
if self.config["build"]["mode"] == "dev":
dev = True
elif self.config["build"]["mode"] == "release":
release = True
+ elif release_exists and not dev_exists:
+ release = True
+ elif dev_exists and not release_exists:
+ dev = True
else:
print("Please specify either --dev (-d) for a development")
print(" build, or --release (-r) for an optimized build.")