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

Side by Side Diff: pylib/gyp/xcode_emulation.py

Issue 1975753007: ninja/mac: Add horrible workaround for horrible Xcode 7.3 ld bug. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 else: 833 else:
834 assert self.configname 834 assert self.configname
835 archs = self.GetActiveArchs(self.configname) 835 archs = self.GetActiveArchs(self.configname)
836 if len(archs) != 1: 836 if len(archs) != 1:
837 # TODO: Supporting fat binaries will be annoying. 837 # TODO: Supporting fat binaries will be annoying.
838 self._WarnUnimplemented('ARCHS') 838 self._WarnUnimplemented('ARCHS')
839 archs = ['i386'] 839 archs = ['i386']
840 ldflags.append('-arch ' + archs[0]) 840 ldflags.append('-arch ' + archs[0])
841 841
842 # Xcode adds the product directory by default. 842 # Xcode adds the product directory by default.
843 ldflags.append('-L' + product_dir) 843 # Rewrite -L. to -L./ to work around http://www.openradar.me/25313838
844 ldflags.append('-L' + (product_dir if product_dir != '.' else './'))
844 845
845 install_name = self.GetInstallName() 846 install_name = self.GetInstallName()
846 if install_name and self.spec['type'] != 'loadable_module': 847 if install_name and self.spec['type'] != 'loadable_module':
847 ldflags.append('-install_name ' + install_name.replace(' ', r'\ ')) 848 ldflags.append('-install_name ' + install_name.replace(' ', r'\ '))
848 849
849 for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []): 850 for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []):
850 ldflags.append('-Wl,-rpath,' + rpath) 851 ldflags.append('-Wl,-rpath,' + rpath)
851 852
852 sdk_root = self._SdkPath() 853 sdk_root = self._SdkPath()
853 if not sdk_root: 854 if not sdk_root:
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 if toolset == 'target': 1710 if toolset == 'target':
1710 iphoneos_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos' 1711 iphoneos_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos'
1711 return targets 1712 return targets
1712 1713
1713 def CloneConfigurationForDeviceAndEmulator(target_dicts): 1714 def CloneConfigurationForDeviceAndEmulator(target_dicts):
1714 """If |target_dicts| contains any iOS targets, automatically create -iphoneos 1715 """If |target_dicts| contains any iOS targets, automatically create -iphoneos
1715 targets for iOS device builds.""" 1716 targets for iOS device builds."""
1716 if _HasIOSTarget(target_dicts): 1717 if _HasIOSTarget(target_dicts):
1717 return _AddIOSDeviceConfigurations(target_dicts) 1718 return _AddIOSDeviceConfigurations(target_dicts)
1718 return target_dicts 1719 return target_dicts
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698