Improving parallelism when building with goma

It seems that ninja defaults the number of available CPUs.

BUG=chromium:690916
NOTRY=True

Review-Url: https://codereview.webrtc.org/2691393003
Cr-Commit-Position: refs/heads/master@{#16635}
This commit is contained in:
mbonadei 2017-02-15 13:18:57 -08:00 committed by Commit bot
parent 68ab366547
commit 8714b8f1ae

View File

@ -116,11 +116,15 @@ def BuildWebRTC(output_dir, target_arch, flavor, build_type,
raise ValueError('Build type "%s" is not supported.' % build_type)
logging.info('Building WebRTC with args: %s', ' '.join(gn_args))
cmd = ['gn', 'gen', output_dir,
'--args=' + ' '.join(gn_args + extra_gn_args)]
_RunCommand(cmd)
logging.info('Building target: %s', gn_target_name)
cmd = ['ninja', '-C', output_dir, gn_target_name]
if use_goma:
cmd.extend(['-j', '200'])
_RunCommand(cmd)
# Strip debug symbols to reduce size.