r189372 - scan-build: Set CC and CXX as make variables when wrapping make builds.

Jordan Rose jordan_rose at apple.com
Tue Aug 27 09:59:33 PDT 2013


Author: jrose
Date: Tue Aug 27 11:59:33 2013
New Revision: 189372

URL: http://llvm.org/viewvc/llvm-project?rev=189372&view=rev
Log:
scan-build: Set CC and CXX as make variables when wrapping make builds.

Variables set in a makefile are not overridden by environment variables.
Make sure we actually override CC and CXX when using scan-build.

Patch by Steve McCoy!

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=189372&r1=189371&r2=189372&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/scan-build (original)
+++ cfe/trunk/tools/scan-build/scan-build Tue Aug 27 11:59:33 2013
@@ -1018,10 +1018,10 @@ sub RunBuildCommand {
     shift @$Args;
     unshift @$Args, $CXXAnalyzer;
   }
-  elsif ($IgnoreErrors) {
-    if ($Cmd eq "make" or $Cmd eq "gmake") {
-      AddIfNotPresent($Args, "CC=$CCAnalyzer");
-      AddIfNotPresent($Args, "CXX=$CXXAnalyzer");
+  elsif ($Cmd eq "make" or $Cmd eq "gmake") {
+    AddIfNotPresent($Args, "CC=$CCAnalyzer");
+    AddIfNotPresent($Args, "CXX=$CXXAnalyzer");
+    if ($IgnoreErrors) {
       AddIfNotPresent($Args,"-k");
       AddIfNotPresent($Args,"-i");
     }





More information about the cfe-commits mailing list