Add -v or --verbose to mach build

This commit is contained in:
Dirk Leifeld 2014-09-11 18:46:18 +02:00
parent f3653342df
commit f2a692e0ff

View file

@ -33,7 +33,10 @@ class MachCommands(CommandBase):
@CommandArgument('--jobs', '-j',
default=None,
help='Number of jobs to run in parallel')
def build(self, target, release=False, jobs=None):
@CommandArgument('--verbose', '-v',
action='store_true',
help='Print verbose output')
def build(self, target, release=False, jobs=None, verbose=False):
self.ensure_bootstrapped()
opts = []
@ -43,6 +46,8 @@ class MachCommands(CommandBase):
opts += ["--target", target]
if jobs is not None:
opts += ["-j", jobs]
if verbose:
opts += ["-v"]
build_start = time()
subprocess.check_call(["cargo", "build"] + opts, env=self.build_env())