[cfe-commits] r50506 - /cfe/trunk/utils/scan-build
Ted Kremenek
kremenek at apple.com
Wed Apr 30 16:47:12 PDT 2008
Author: kremenek
Date: Wed Apr 30 18:47:12 2008
New Revision: 50506
URL: http://llvm.org/viewvc/llvm-project?rev=50506&view=rev
Log:
scan-build: Disable distributed builds for xcodebuild
Modified:
cfe/trunk/utils/scan-build
Modified: cfe/trunk/utils/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=50506&r1=50505&r2=50506&view=diff
==============================================================================
--- cfe/trunk/utils/scan-build (original)
+++ cfe/trunk/utils/scan-build Wed Apr 30 18:47:12 2008
@@ -390,6 +390,23 @@
# RunBuildCommand - Run the build command.
##----------------------------------------------------------------------------##
+sub AddIfNotPresent {
+ my $Args = shift;
+ my $Arg = shift;
+ my $found = 0;
+
+ foreach my $k (@$Args) {
+ if ($k eq $Arg) {
+ $found = 1;
+ last;
+ }
+ }
+
+ if ($found == 0) {
+ push @$Args, $Arg;
+ }
+}
+
sub RunBuildCommand {
my $Args = shift;
@@ -402,12 +419,17 @@
}
elsif ($IgnoreErrors) {
if ($Cmd eq "make" or $Cmd eq "gmake") {
- push @$Args, "-k";
+ AddIfNotPresent($Args,"-k");
}
elsif ($Cmd eq "xcodebuild") {
- push @$Args, "-PBXBuildsContinueAfterErrors=YES";
+ AddIfNotPresent($Args,"-PBXBuildsContinueAfterErrors=YES");
}
- }
+ }
+
+ # Disable distributed builds for xcodebuild.
+ if ($Cmd eq "xcodebuild") {
+ AddIfNotPresent($Args,"-nodistribute");
+ }
system(@$Args);
}
More information about the cfe-commits
mailing list