Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: pylib/gyp/generator/ninja.py

Issue 25355002: ninja/mac: Create -iphoneos device builds for iOS ninja generator. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Rebaase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/ios/app-bundle/test-device.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
===================================================================
--- pylib/gyp/generator/ninja.py (revision 1746)
+++ pylib/gyp/generator/ninja.py (working copy)
@@ -2113,7 +2113,33 @@
GenerateOutputForConfig(target_list, target_dicts, data, params, config_name)
+def TargetsHaveIOS(targets):
+ for target_name, target_dict in targets.items():
+ for config_name in target_dict['configurations'].keys():
Nico 2013/10/04 05:11:10 Omit ".keys()", iterating a dict iterates the keys
justincohen 2013/10/04 13:51:52 Done.
+ config = target_dict['configurations'][config_name]
+ settings = config.get('xcode_settings', None)
Nico 2013/10/04 05:11:10 None is the default for get, you can omit it – bu
justincohen 2013/10/04 13:51:52 Done.
+ if settings and settings.get('IPHONEOS_DEPLOYMENT_TARGET', None):
+ return True
+ return False
+
+
+def UpdateIOSDeviceConfigurations(targets):
+ for target_name, target_dict in targets.items():
+ for config_name in target_dict['configurations'].keys():
+ config = target_dict['configurations'][config_name]
+ new_config_name = config_name+'-iphoneos'
Nico 2013/10/04 05:11:10 spaces around +
justincohen 2013/10/04 13:51:52 Done.
+ new_config_dict = copy.deepcopy(config)
Nico 2013/10/04 05:11:10 How much does this slow down gyp?
justincohen 2013/10/04 13:51:52 For Chrome for iOS, GenerateOutput is called 736 t
+ if target_dict['toolset'] == 'target':
+ new_config_dict['xcode_settings']['ARCHS'] = ['armv7']
+ new_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos'
+ target_dict['configurations'][new_config_name] = new_config_dict
+ return targets
+
def GenerateOutput(target_list, target_dicts, data, params):
Nico 2013/10/04 05:11:10 call xcode_emulation.CloneConfigurationsForDeviceA
justincohen 2013/10/04 13:51:52 Done.
+ # Update target_dicts for iOS device builds.
+ if TargetsHaveIOS(target_dicts):
+ target_dicts = UpdateIOSDeviceConfigurations(target_dicts)
+
user_config = params.get('generator_flags', {}).get('config', None)
if gyp.common.GetFlavor(params) == 'win':
target_list, target_dicts = MSVSUtil.ShardTargets(target_list, target_dicts)
« no previous file with comments | « no previous file | test/ios/app-bundle/test-device.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698