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.

This commit is contained in:
Josh Matthews 2014-10-10 15:46:03 -04:00
parent a258746269
commit a1b2f4b590
9 changed files with 38 additions and 24 deletions

View file

@ -108,7 +108,7 @@ class MachCommands(CommandBase):
tgz_file = "cargo-nightly-%s.tar.gz" % host_triple()
# FIXME(#3582): use https.
nightly_url = "http://static.rust-lang.org/cargo-dist/2014-10-02/%s" % tgz_file
nightly_url = "http://static.rust-lang.org/cargo-dist/2014-10-21/%s" % tgz_file
download("Cargo nightly", nightly_url, tgz_file)

View file

@ -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 = []