diff --git a/webrtc/build/gyp_webrtc b/webrtc/build/gyp_webrtc index 5945b95cf9..3ca64d94de 100755 --- a/webrtc/build/gyp_webrtc +++ b/webrtc/build/gyp_webrtc @@ -90,18 +90,6 @@ if __name__ == '__main__': gyp_chromium.additional_include_files(supplemental_includes, args)]) - # Set target_subarch for iOS builds if not already set. - if gyp_vars.get('OS') == 'ios' and 'target_subarch' not in gyp_vars: - os.environ.setdefault('GYP_DEFINES', '') - target_subarch = None - if gyp_vars.get('target_arch') in ('arm', 'ia32'): - target_subarch = 'arm32' - elif gyp_vars.get('target_arch') in ('arm64', 'x64'): - target_subarch = 'arm64' - if target_subarch: - print 'INFO: Appending target_subarch=%s to GYP_DEFINES' % target_subarch - os.environ['GYP_DEFINES'] += ' target_subarch=%s' % target_subarch - # Set the gyp depth variable to the root of the checkout. args.append('--depth=' + os.path.relpath(checkout_root)) diff --git a/webrtc/supplement.gypi b/webrtc/supplement.gypi index d66b828177..075e2adb06 100644 --- a/webrtc/supplement.gypi +++ b/webrtc/supplement.gypi @@ -9,6 +9,17 @@ ['OS=="ios"', { # Default to using BoringSSL on iOS. 'use_openssl%': 1, + + # Set target_subarch for if not already set. This is needed because the + # Chromium iOS toolchain relies on target_subarch being set. + 'conditions': [ + ['target_arch=="arm" or target_arch=="ia32"', { + 'target_subarch%': 'arm32', + }], + ['target_arch=="arm64" or target_arch=="x64"', { + 'target_subarch%': 'arm64', + }], + ], }], ], },