On Linux, when building clang with cmake, the installed executables look like this:
lrwxrwxrwx 1 aadgrand users 9 Jun 29 09:46 clang -> clang-3.2 lrwxrwxrwx 1 aadgrand users 5 Jul 20 09:45 clang++ -> clang -rwxr-xr-x 1 aadgrand users 31478564 Jul 20 09:32 clang-3.2 To get the clang++ pathname, scan-build blind append '++' to the real path it found for clang (i.e. ..../clang-3.2). The attached patch strips the version info from the executable name before appending '++'. OK to commit ? Cheers, -- Arnaud de Grandmaison
>From 5734e95c59d050de856389e4e82d9ca4d6b1ff80 Mon Sep 17 00:00:00 2001 From: "Arnaud A. de Grandmaison" <[email protected]> Date: Fri, 20 Jul 2012 14:34:23 +0200 Subject: [PATCH] [scan-build] Fix clang++ pathname --- tools/scan-build/scan-build | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/scan-build/scan-build b/tools/scan-build/scan-build index 424e15a..0ba26e2 100755 --- a/tools/scan-build/scan-build +++ b/tools/scan-build/scan-build @@ -113,7 +113,9 @@ if (!defined $ClangSB || ! -x $ClangSB) { else { $Clang = $ClangSB; } -my $ClangCXX = $Clang . "++"; +my $ClangCXX = $Clang; +$ClangCXX =~ s/\-\d+\.\d+$//; +$ClangCXX .= "++"; my $ClangVersion = HtmlEscape(`$Clang --version`); ##----------------------------------------------------------------------------## -- 1.7.8.6
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
