| Index: build/mac/find_sdk.py
|
| diff --git a/build/mac/find_sdk.py b/build/mac/find_sdk.py
|
| index ce23524c0fd57631722d643e7e210f292afe5c1d..618c0f57487e78aaccd294e525309909a167dbb8 100755
|
| --- a/build/mac/find_sdk.py
|
| +++ b/build/mac/find_sdk.py
|
| @@ -52,16 +52,9 @@ def main():
|
| if job.returncode != 0:
|
| print >> sys.stderr, out
|
| print >> sys.stderr, err
|
| - raise Exception(('Error %d running xcode-select, you might have to run '
|
| - '|sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer| '
|
| - 'if you are using Xcode 4.') % job.returncode)
|
| - # The Developer folder moved in Xcode 4.3.
|
| - xcode43_sdk_path = os.path.join(
|
| + raise Exception('Error %d running xcode-select' % job.returncode)
|
| + sdk_dir = os.path.join(
|
| out.rstrip(), 'Platforms/MacOSX.platform/Developer/SDKs')
|
| - if os.path.isdir(xcode43_sdk_path):
|
| - sdk_dir = xcode43_sdk_path
|
| - else:
|
| - sdk_dir = os.path.join(out.rstrip(), 'SDKs')
|
| sdks = [re.findall('^MacOSX(10\.\d+)\.sdk$', s) for s in os.listdir(sdk_dir)]
|
| sdks = [s[0] for s in sdks if s] # [['10.5'], ['10.6']] => ['10.5', '10.6']
|
| sdks = [s for s in sdks # ['10.5', '10.6'] => ['10.6']
|
| @@ -85,8 +78,8 @@ def main():
|
| return min_sdk_version
|
|
|
| if options.print_sdk_path:
|
| - print subprocess.check_output(['xcodebuild', '-version', '-sdk',
|
| - 'macosx' + best_sdk, 'Path']).strip()
|
| + print subprocess.check_output(
|
| + ['xcrun', '-sdk', 'macosx' + best_sdk, '--show-sdk-path']).strip()
|
|
|
| return best_sdk
|
|
|
|
|