| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """ | 5 """ |
| 6 This module contains classes that help to emulate xcodebuild behavior on top of | 6 This module contains classes that help to emulate xcodebuild behavior on top of |
| 7 other build systems, such as make and ninja. | 7 other build systems, such as make and ninja. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import copy | 10 import copy |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 xcode_settings.GetBundleResourceFolder() | 1314 xcode_settings.GetBundleResourceFolder() |
| 1315 env['INFOPLIST_PATH'] = xcode_settings.GetBundlePlistPath() | 1315 env['INFOPLIST_PATH'] = xcode_settings.GetBundlePlistPath() |
| 1316 env['WRAPPER_NAME'] = xcode_settings.GetWrapperName() | 1316 env['WRAPPER_NAME'] = xcode_settings.GetWrapperName() |
| 1317 | 1317 |
| 1318 install_name = xcode_settings.GetInstallName() | 1318 install_name = xcode_settings.GetInstallName() |
| 1319 if install_name: | 1319 if install_name: |
| 1320 env['LD_DYLIB_INSTALL_NAME'] = install_name | 1320 env['LD_DYLIB_INSTALL_NAME'] = install_name |
| 1321 install_name_base = xcode_settings.GetInstallNameBase() | 1321 install_name_base = xcode_settings.GetInstallNameBase() |
| 1322 if install_name_base: | 1322 if install_name_base: |
| 1323 env['DYLIB_INSTALL_NAME_BASE'] = install_name_base | 1323 env['DYLIB_INSTALL_NAME_BASE'] = install_name_base |
| 1324 if XcodeVersion() >= '0500' and not env.get('SDKROOT'): |
| 1325 sdk_root = xcode_settings._SdkRoot(configuration) |
| 1326 if not sdk_root: |
| 1327 sdk_root = xcode_settings._XcodeSdkPath('') |
| 1328 env['SDKROOT'] = sdk_root |
| 1324 | 1329 |
| 1325 if not additional_settings: | 1330 if not additional_settings: |
| 1326 additional_settings = {} | 1331 additional_settings = {} |
| 1327 else: | 1332 else: |
| 1328 # Flatten lists to strings. | 1333 # Flatten lists to strings. |
| 1329 for k in additional_settings: | 1334 for k in additional_settings: |
| 1330 if not isinstance(additional_settings[k], str): | 1335 if not isinstance(additional_settings[k], str): |
| 1331 additional_settings[k] = ' '.join(additional_settings[k]) | 1336 additional_settings[k] = ' '.join(additional_settings[k]) |
| 1332 additional_settings.update(env) | 1337 additional_settings.update(env) |
| 1333 | 1338 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 _FilterIOSArchitectureForSDKROOT(iphoneos_config_dict['xcode_settings']) | 1495 _FilterIOSArchitectureForSDKROOT(iphoneos_config_dict['xcode_settings']) |
| 1491 _FilterIOSArchitectureForSDKROOT(config_dict['xcode_settings']) | 1496 _FilterIOSArchitectureForSDKROOT(config_dict['xcode_settings']) |
| 1492 return targets | 1497 return targets |
| 1493 | 1498 |
| 1494 def CloneConfigurationForDeviceAndEmulator(target_dicts): | 1499 def CloneConfigurationForDeviceAndEmulator(target_dicts): |
| 1495 """If |target_dicts| contains any iOS targets, automatically create -iphoneos | 1500 """If |target_dicts| contains any iOS targets, automatically create -iphoneos |
| 1496 targets for iOS device builds.""" | 1501 targets for iOS device builds.""" |
| 1497 if _HasIOSTarget(target_dicts): | 1502 if _HasIOSTarget(target_dicts): |
| 1498 return _AddIOSDeviceConfigurations(target_dicts) | 1503 return _AddIOSDeviceConfigurations(target_dicts) |
| 1499 return target_dicts | 1504 return target_dicts |
| OLD | NEW |