diff options
-rwxr-xr-x | utils/scan-build | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/scan-build b/utils/scan-build index e305ee50a7..f881cc8ea6 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -534,6 +534,11 @@ sub RunBuildCommand { my $Cmd = $Args->[0]; my $CCAnalyzer = shift; + # Get only the part of the command after the last '/'. + if ($Cmd =~ /\/([^\/]+)$/) { + $Cmd = $1; + } + if ($Cmd eq "gcc" or $Cmd eq "cc" or $Cmd eq "llvm-gcc") { shift @$Args; unshift @$Args, $CCAnalyzer; |