Use Siso in iOS/Android build scripts
build_aar.py and build_ios_libs.py are still using Ninja to build.
This CL switches them to use Siso.
The CL needs to be submitted with the corresponding recipe change
https://crrev.com/c/6546855.
Bug: b/412968361
Change-Id: I46042aaaac833f7840bc37510b30d2c45d2d0a31
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/391480
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Christoffer Dewerin <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44684}
diff --git a/tools_webrtc/android/build_aar.py b/tools_webrtc/android/build_aar.py
index d3da726..e394f75 100755
--- a/tools_webrtc/android/build_aar.py
+++ b/tools_webrtc/android/build_aar.py
@@ -118,8 +118,10 @@
def _RunNinja(output_directory, args):
cmd = [
- os.path.join(SRC_DIR, 'third_party', 'ninja', 'ninja'), '-C',
- output_directory
+ os.path.join(SRC_DIR, 'third_party', 'siso', 'cipd', 'siso'),
+ 'ninja',
+ '-C',
+ output_directory,
]
cmd.extend(args)
logging.debug('Running: %r', cmd)
@@ -175,9 +177,14 @@
'is_component_build': False,
'rtc_include_tests': False,
'target_cpu': _GetTargetCpu(arch),
- 'use_remoteexec': use_remoteexec,
'android_static_analysis': "off",
+ 'use_siso': True,
}
+ if use_remoteexec:
+ gn_args.update({
+ 'use_remoteexec': True,
+ 'use_reclient': False,
+ })
arm_version = _GetArmVersion(arch)
if arm_version:
gn_args['arm_version'] = arm_version
@@ -191,7 +198,7 @@
ninja_args = TARGETS[:]
if use_remoteexec:
- ninja_args.extend(['-j', '200'])
+ ninja_args.extend(['-remote_jobs', '200'])
ninja_args.extend(extra_ninja_switches)
_RunNinja(output_directory, ninja_args)
diff --git a/tools_webrtc/ios/build_ios_libs.py b/tools_webrtc/ios/build_ios_libs.py
index 816cee5..08ae2f7 100755
--- a/tools_webrtc/ios/build_ios_libs.py
+++ b/tools_webrtc/ios/build_ios_libs.py
@@ -190,8 +190,13 @@
('true' if libvpx_build_vp9 else 'false'))
gn_args.append('use_lld=true')
- gn_args.append('use_remoteexec=' + ('true' if use_remoteexec else 'false'))
gn_args.append('rtc_enable_objc_symbol_export=true')
+ gn_args.append('use_siso=true')
+ if use_remoteexec:
+ gn_args.extend([
+ 'use_remoteexec=true',
+ 'use_reclient=false',
+ ])
args_string = ' '.join(gn_args + extra_gn_args)
logging.info('Building WebRTC with args: %s', args_string)
@@ -207,13 +212,14 @@
logging.info('Building target: %s', gn_target_name)
cmd = [
- os.path.join(SRC_DIR, 'third_party', 'ninja', 'ninja'),
+ os.path.join(SRC_DIR, 'third_party', 'siso', 'cipd', 'siso'),
+ 'ninja',
'-C',
output_dir,
gn_target_name,
]
if use_remoteexec:
- cmd.extend(['-j', '200'])
+ cmd.extend(['-remote_jobs', '200'])
_RunCommand(cmd)