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}
diff --git a/tools-webrtc/ios/build_ios_libs.py b/tools-webrtc/ios/build_ios_libs.py
index fc6e88b..3740483 100755
--- a/tools-webrtc/ios/build_ios_libs.py
+++ b/tools-webrtc/ios/build_ios_libs.py
@@ -116,11 +116,15 @@
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.