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

Unified Diff: build/mac/find_sdk.py

Issue 1988023006: mac: Make `find_sdk.py --print_sdk_path` much faster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« 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