From: Ted Kremenek Date: Wed, 31 Dec 2014 08:19:08 +0000 (+0000) Subject: [analyzer] Include a couple more comments on using xcrun to query the SDK. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d5a4a7eff4517e0946d59df72190f29edc0621b;p=clang [analyzer] Include a couple more comments on using xcrun to query the SDK. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225039 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer index c99328221a..9de38d42aa 100755 --- a/tools/scan-build/ccc-analyzer +++ b/tools/scan-build/ccc-analyzer @@ -41,11 +41,15 @@ my $Clang; my $DefaultCCompiler; my $DefaultCXXCompiler; my $IsCXX; + +# If on OSX, use xcrun to determine the SDK root. my $UseXCRUN = 0; if (`uname -a` =~ m/Darwin/) { $DefaultCCompiler = 'clang'; $DefaultCXXCompiler = 'clang++'; + # Older versions of OSX do not have xcrun to + # query the SDK location. if (-x "/usr/bin/xcrun") { $UseXCRUN = 1; }