diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-30 23:47:12 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-30 23:47:12 +0000 |
commit | 6b6289848e215ff12d4d54fe0602d3371db52788 (patch) | |
tree | 098e8c24685b87f548584acb36698f4ec9131c80 | |
parent | c1ff3cd5fe4436bb14309fdc5ee7e1c2b702b7c3 (diff) |
scan-build: Disable distributed builds for xcodebuild
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50506 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-x | utils/scan-build | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/utils/scan-build b/utils/scan-build index 0eb798026c..0024c8ec36 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -390,6 +390,23 @@ ENDTEXT # 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 @@ sub RunBuildCommand { } 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); } |