mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 837846 - Respect MOZ_MAKE_FLAGS when running make commands from mach. r=mshal
This commit is contained in:
parent
bd8065dffa
commit
4de8112911
@ -421,6 +421,26 @@ class MozbuildObject(ProcessExecutionMixin):
|
||||
if filename:
|
||||
args.extend(['-f', filename])
|
||||
|
||||
if num_jobs == 0 and self.mozconfig['make_flags']:
|
||||
flags = iter(self.mozconfig['make_flags'])
|
||||
for flag in flags:
|
||||
if flag == '-j':
|
||||
try:
|
||||
flag = flags.next()
|
||||
except StopIteration:
|
||||
break
|
||||
try:
|
||||
num_jobs = int(flag)
|
||||
except ValueError:
|
||||
args.append(flag)
|
||||
elif flag.startswith('-j'):
|
||||
try:
|
||||
num_jobs = int(flag[2:])
|
||||
except (ValueError, IndexError):
|
||||
break
|
||||
else:
|
||||
args.append(flag)
|
||||
|
||||
if allow_parallel:
|
||||
if num_jobs > 0:
|
||||
args.append('-j%d' % num_jobs)
|
||||
|
Loading…
Reference in New Issue
Block a user