From 382c58d1275936e12805d78b16ae68f81e625af2 Mon Sep 17 00:00:00 2001 From: Henrik Kjellander Date: Thu, 16 Apr 2015 09:24:30 +0200 Subject: [PATCH] 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} --- webrtc/build/gyp_webrtc | 12 ------------ webrtc/supplement.gypi | 11 +++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) 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', + }], + ], }], ], },