diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-10-10 15:46:03 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-10-24 16:18:25 -0400 |
commit | a1b2f4b59081810f8a31a147c2226c74be222953 (patch) | |
tree | a52f3dbc683bf5a05a8c62b85cdf224c0e88a257 /python/servo/build_commands.py | |
parent | a2587462693bf73412a729dfaccb2abb0d3f6ff6 (diff) | |
download | servo-a1b2f4b59081810f8a31a147c2226c74be222953.tar.gz servo-a1b2f4b59081810f8a31a147c2226c74be222953.zip |
Add an optional --debug-mozjs argument to `mach build` that enables a non-optimized, debug build of mozjs and rust-mozjs. Update the Cargo snapshot to enable new feature support.
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 5a7316a9b97..7dd4b3995f5 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -31,11 +31,15 @@ class MachCommands(CommandBase): default=None, action='store_true', help='Build for Android') + @CommandArgument('--debug-mozjs', + default=None, + action='store_true', + help='Enable debug assertions in mozjs') @CommandArgument('--verbose', '-v', action='store_true', help='Print verbose output') def build(self, target=None, release=False, jobs=None, android=None, - verbose=False): + verbose=False, debug_mozjs=False): self.ensure_bootstrapped() if android is None: @@ -51,6 +55,13 @@ class MachCommands(CommandBase): if verbose: opts += ["-v"] + features = [] + if debug_mozjs: + features += ["script/debugmozjs"] + + if features: + opts += ["--features", "%s" % ' '.join(features)] + build_start = time() if android: make_opts = [] |