r201586 - In some cases (for example, the Firefox build system), the CLANG_CXX variable is defined but empty.

Sylvestre Ledru sylvestre at debian.org
Tue Feb 18 09:45:06 PST 2014


Author: sylvestre
Date: Tue Feb 18 11:45:06 2014
New Revision: 201586

URL: http://llvm.org/viewvc/llvm-project?rev=201586&view=rev
Log:
In some cases (for example, the Firefox build system), the CLANG_CXX variable is defined but empty.
Extend the test (like it is done in scan-build) to check also if the variable 
is empty or not.


Modified:
    cfe/trunk/tools/scan-build/ccc-analyzer

Modified: cfe/trunk/tools/scan-build/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/ccc-analyzer?rev=201586&r1=201585&r2=201586&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Tue Feb 18 11:45:06 2014
@@ -41,19 +41,19 @@ if (`uname -a` =~ m/Darwin/) {
 
 if ($FindBin::Script =~ /c\+\+-analyzer/) {
   $Compiler = $ENV{'CCC_CXX'};
-  if (!defined $Compiler) { $Compiler = $DefaultCXXCompiler; }
+  if (!defined $Compiler || ! -x $Compiler) { $Compiler = $DefaultCXXCompiler; }
 
   $Clang = $ENV{'CLANG_CXX'};
-  if (!defined $Clang) { $Clang = 'clang++'; }
+  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang++'; }
 
   $IsCXX = 1
 }
 else {
   $Compiler = $ENV{'CCC_CC'};
-  if (!defined $Compiler) { $Compiler = $DefaultCCompiler; }
+  if (!defined $Compiler || ! -x $Compiler) { $Compiler = $DefaultCCompiler; }
 
   $Clang = $ENV{'CLANG'};
-  if (!defined $Clang) { $Clang = 'clang'; }
+  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang'; }
 
   $IsCXX = 0
 }





More information about the cfe-commits mailing list