summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-07-16 21:39:29 +0000
committerTed Kremenek <kremenek@apple.com>2012-07-16 21:39:29 +0000
commit4abbade558f56b933fc3334d2e42e76ab0592fc4 (patch)
tree47aea2ff21953e27ea08e3df1f6f1bda7b377193
parentcf74cef104b737cda45f3014d42814dc26423d05 (diff)
downloadbcm5719-llvm-4abbade558f56b933fc3334d2e42e76ab0592fc4.tar.gz
bcm5719-llvm-4abbade558f56b933fc3334d2e42e76ab0592fc4.zip
Add hack (provided by Jonathan Sauer) to fall back to assuming Xcode is installed in /Developer
when using Python < 2.7.0. This is the case on Snow Leopard, where the tools are always installed in /Developer. This isn't a proper fix for really figuring out where Xcode is installed, but should work to fix an obvious problem on Snow Leopard. llvm-svn: 160321
-rwxr-xr-xclang/tools/scan-build/set-xcode-analyzer6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/tools/scan-build/set-xcode-analyzer b/clang/tools/scan-build/set-xcode-analyzer
index 06e1d857de9..c280bb4d40a 100755
--- a/clang/tools/scan-build/set-xcode-analyzer
+++ b/clang/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.
OpenPOWER on IntegriCloud