scan-build: Also look for clang-cc in ../libexec

llvm-svn: 67972
This commit is contained in:
Ted Kremenek 2009-03-29 00:31:32 +00:00
parent 8eda11bd9d
commit 554b5370e4
1 changed files with 9 additions and 6 deletions

View File

@ -81,18 +81,21 @@ sub DieDiag {
# Some initial preprocessing of Clang options.
##----------------------------------------------------------------------------##
# First, look for 'clang-cc' in libexec.
my $ClangSB = Cwd::realpath("$RealBin/libexec/clang-cc");
# Also look for 'clang-cc' in the same directory as scan-build.
# Second, look for 'clang-cc' in the same directory as scan-build.
if (!defined $ClangSB || ! -x $ClangSB) {
$ClangSB = Cwd::realpath("$RealBin/clang-cc");
}
my $Clang = $ClangSB;
# Third, look for 'clang-cc' in ../libexec
if (!defined $ClangSB || ! -x $ClangSB) {
$Clang = "clang-cc";
$ClangSB = Cwd::realpath("$RealBin/../libexec/clang-cc");
}
# Finally, default to looking for 'clang-cc' in the path.
if (!defined $ClangSB || ! -x $ClangSB) {
$ClangSB = "clang-cc";
}
my $Clang = $ClangSB;
my %AvailableAnalyses;