aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorPrabhjyot Singh Sodhi <prabhjyotsingh95@gmail.com>2015-02-06 00:42:31 +0530
committerPrabhjyot Singh Sodhi <prabhjyotsingh95@gmail.com>2015-02-06 00:42:31 +0530
commitd322811bfba1df3e0351d8eb5b8af94b206f7dae (patch)
treeb6e2be76a1f739d09aa0d872f65c0cdbcf6c0c14 /python
parentd439c0d16d6ea1449d207858705d124e191ecc13 (diff)
downloadservo-d322811bfba1df3e0351d8eb5b8af94b206f7dae.tar.gz
servo-d322811bfba1df3e0351d8eb5b8af94b206f7dae.zip
adding --release flag to mach run command
Diffstat (limited to 'python')
-rw-r--r--python/servo/post_build_commands.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index 0b070eb2c14..7cec97f0d0a 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -33,6 +33,8 @@ class MachCommands(CommandBase):
@Command('run',
description='Run Servo',
category='post-build')
+ @CommandArgument('--release', '-r', action='store_true',
+ help='Running release builds')
@CommandArgument('--debug', action='store_true',
help='Enable the debugger. Not specifying a '
'--debugger option will result in the default '
@@ -43,11 +45,14 @@ class MachCommands(CommandBase):
@CommandArgument(
'params', nargs='...',
help="Command-line arguments to be passed through to Servo")
- def run(self, params, debug=False, debugger=None):
+ def run(self, params, release=False, debug=False, debugger=None):
env = self.build_env()
env["RUST_BACKTRACE"] = "1"
- args = [path.join("components", "servo", "target", "servo")]
+ if release:
+ args = [path.join("components", "servo", "target", "release", "servo")]
+ else:
+ args = [path.join("components", "servo", "target", "servo")]
# Borrowed and modified from:
# http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/python/mozbuild/mozbuild/mach_commands.py#l883