]> granicus.if.org Git - clang/commitdiff
Implemented "-k" support.
authorTed Kremenek <kremenek@apple.com>
Wed, 2 Apr 2008 16:04:51 +0000 (16:04 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 2 Apr 2008 16:04:51 +0000 (16:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49090 91177308-0d34-0410-b5e6-96231b3b80d8

utils/scan-build

index aef4e67fb56bb6192737eb9ccc21edb01dace733..01e30997e6db715656c2885947e7640e8d9775f8 100755 (executable)
@@ -148,17 +148,25 @@ sub Postprocess {
 sub RunBuildCommand {
   
   my $Args = shift;
+  my $IgnoreErrors = shift;
   my $Cmd = $Args->[0];
   
   if ($Cmd eq "gcc" or $Cmd eq "cc" or $Cmd eq "llvm-gcc") {
     shift @$Args;
     unshift @$Args, "ccc-analyzer"
   }
+  elsif ($IgnoreErrors) {
+    if ($Cmd eq "make" or $Cmd eq "gmake") {
+      push @$Args, "-k";
+    }
+    elsif ($Cmd eq "xcodebuild") {
+      push @$Args, "-PBXBuildsContinueAfterErrors=YES";
+    }
+  }
   
   system(@$Args);
 }
 
-
 ##----------------------------------------------------------------------------##
 # DisplayHelp - Utility function to display all help options.
 ##----------------------------------------------------------------------------##
@@ -288,7 +296,7 @@ if ($Verbose >= 2) {
 
 # Run the build.
 
-RunBuildCommand(\@ARGV);
+RunBuildCommand(\@ARGV, $IgnoreErrors);
 
 # Postprocess the HTML directory.