Author: kremenek
Date: Mon Jul 16 16:39:29 2012
New Revision: 160321

URL: http://llvm.org/viewvc/llvm-project?rev=160321&view=rev
Log:
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.

Modified:
    cfe/trunk/tools/scan-build/set-xcode-analyzer

Modified: cfe/trunk/tools/scan-build/set-xcode-analyzer
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/set-xcode-analyzer?rev=160321&r1=160320&r2=160321&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/set-xcode-analyzer (original)
+++ cfe/trunk/tools/scan-build/set-xcode-analyzer Mon Jul 16 16:39:29 2012
@@ -75,7 +75,11 @@
     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.


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to