From: Ted Kremenek Date: Sun, 29 Mar 2009 00:31:32 +0000 (+0000) Subject: scan-build: Also look for clang-cc in ../libexec X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=833da0235676a111d6192b0b182a8c16c27cceee;p=clang scan-build: Also look for clang-cc in ../libexec git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67972 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/scan-build b/utils/scan-build index 8a13c6d3ff..27883f0d86 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -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;