Move target_subarch from gyp_webrtc to supplement.gypi

Since the webrtc/build/supplement.gypi file is loaded before
Chromium's build/common.gypi it is the right place to override
GYP variables. This makes it possible to use the approach in
https://webrtc-codereview.appspot.com/48869004, which I applied
to supplement.gypi in this CL, instead of the hacky approach in
https://webrtc-codereview.appspot.com/48909004 (removed in this CL).

R=tkchin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50729004

Cr-Commit-Position: refs/heads/master@{#9017}
This commit is contained in:
Henrik Kjellander 2015-04-16 09:24:30 +02:00
parent f2497cf517
commit 382c58d127
2 changed files with 11 additions and 12 deletions

View File

@ -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))

View File

@ -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',
}],
],
}],
],
},