diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /tools/scan-build/set-xcode-analyzer | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'tools/scan-build/set-xcode-analyzer')
-rwxr-xr-x | tools/scan-build/set-xcode-analyzer | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/scan-build/set-xcode-analyzer b/tools/scan-build/set-xcode-analyzer index 06e1d85..c280bb4 100755 --- a/tools/scan-build/set-xcode-analyzer +++ b/tools/scan-build/set-xcode-analyzer @@ -75,7 +75,11 @@ def main(): print "(+) Using the Clang bundled with Xcode" path = options.default - xcode_path = subprocess.check_output(["xcode-select", "-print-path"]) + try: + xcode_path = subprocess.check_output(["xcode-select", "-print-path"]) + except AttributeError: + # Fall back to the default install location when using Python < 2.7.0 + xcode_path = "/Developer" if (re.search("Xcode.app", xcode_path)): # Cut off the 'Developer' dir, as the xcspec lies in another part # of the Xcode.app subtree. |