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
This commit is contained in:
Ted Kremenek 2012-07-16 21:39:29 +00:00
parent cf74cef104
commit 4abbade558
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ def main():
print "(+) Using the Clang bundled with Xcode" print "(+) Using the Clang bundled with Xcode"
path = options.default 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)): if (re.search("Xcode.app", xcode_path)):
# Cut off the 'Developer' dir, as the xcspec lies in another part # Cut off the 'Developer' dir, as the xcspec lies in another part
# of the Xcode.app subtree. # of the Xcode.app subtree.