[cfe-commits] r95943 - /cfe/trunk/tools/scan-build/scan-build
Ted Kremenek
kremenek at apple.com
Thu Feb 11 16:12:25 PST 2010
Author: kremenek
Date: Thu Feb 11 18:12:25 2010
New Revision: 95943
URL: http://llvm.org/viewvc/llvm-project?rev=95943&view=rev
Log:
Two changes to scan-build:
(1) When no 'clang' is found with 'scan-build', remember the one from
the path as scan-build sees it, not the build system. This prevents
us from finding different clangs during the build.
(2) Don't set LDPLUSPLUS when running xcodebuild; instead rely on the
clang driver to do the right thing.
Modified:
cfe/trunk/tools/scan-build/scan-build
Modified: cfe/trunk/tools/scan-build/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/scan-build?rev=95943&r1=95942&r2=95943&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/scan-build (original)
+++ cfe/trunk/tools/scan-build/scan-build Thu Feb 11 18:12:25 2010
@@ -88,7 +88,11 @@
my $Clang;
if (!defined $ClangSB || ! -x $ClangSB) {
# Default to looking for 'clang' in the path.
- $Clang = "clang";
+ $Clang = `which clang`;
+ chomp $Clang;
+ if ($Clang eq "") {
+ DieDiag("No 'clang' executable found in path.");
+ }
}
else {
$Clang = $ClangSB;
@@ -842,10 +846,6 @@
# When 'CC' is set, xcodebuild uses it to do all linking, even if we are
# linking C++ object files. Set 'LDPLUSPLUS' so that xcodebuild uses 'g++'
# when linking such files.
- if (!defined $ENV{'CCC_CXX'}) {
- $ENV{'CCC_CXX'} = 'g++';
- }
- $ENV{'LDPLUSPLUS'} = $ENV{'CCC_CXX'};
}
return (system(@$Args) >> 8);
@@ -1192,7 +1192,7 @@
if (!defined $ClangSB || ! -x $ClangSB) {
Diag("'clang' executable not found in '$RealBin/bin'.\n");
- Diag("Using 'clang' from path.\n");
+ Diag("Using 'clang' from path: $Clang\n");
}
$ENV{'CC'} = $Cmd;
More information about the cfe-commits
mailing list