-
Notifications
You must be signed in to change notification settings - Fork 0
/
3.0-analyzer-realpath.patch
57 lines (47 loc) · 1.87 KB
/
3.0-analyzer-realpath.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- a/tools/clang/tools/scan-build/scan-build 2011-08-28 06:50:56.000000000 -0500
+++ b/tools/clang/tools/scan-build/scan-build 2012-01-26 22:09:01.167969800 -0600
@@ -35,6 +35,7 @@
my $HostName = HtmlEscape(hostname() || 'unknown');
my $CurrentDir = HtmlEscape(getcwd());
my $CurrentDirSuffix = basename($CurrentDir);
+my $AbsRealBin = Cwd::realpath($RealBin);
my $CmdArgs;
@@ -81,9 +82,9 @@
##----------------------------------------------------------------------------##
# Find 'clang'
-my $ClangSB = Cwd::realpath("$RealBin/bin/clang");
+my $ClangSB = "$AbsRealBin/bin/clang";
if (!defined $ClangSB || ! -x $ClangSB) {
- $ClangSB = Cwd::realpath("$RealBin/clang");
+ $ClangSB = "$AbsRealBin/clang";
}
my $Clang;
if (!defined $ClangSB || ! -x $ClangSB) {
@@ -401,7 +402,7 @@
my $Dir = shift;
- my $JS = Cwd::realpath("$RealBin/sorttable.js");
+ my $JS = "$AbsRealBin/sorttable.js";
DieDiag("Cannot find 'sorttable.js'.\n")
if (! -r $JS);
@@ -411,7 +412,7 @@
DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n")
if (! -r "$Dir/sorttable.js");
- my $CSS = Cwd::realpath("$RealBin/scanview.css");
+ my $CSS = "$AbsRealBin/scanview.css";
DieDiag("Cannot find 'scanview.css'.\n")
if (! -r $CSS);
@@ -1349,7 +1350,6 @@
$HtmlDir = GetHTMLRunDir($HtmlDir);
# Determine the location of ccc-analyzer.
-my $AbsRealBin = Cwd::realpath($RealBin);
my $Cmd = "$AbsRealBin/libexec/ccc-analyzer";
my $CmdCXX = "$AbsRealBin/libexec/c++-analyzer";
@@ -1416,7 +1416,7 @@
if ($ViewResults and -r "$HtmlDir/index.html") {
Diag "Analysis run complete.\n";
Diag "Viewing analysis results in '$HtmlDir' using scan-view.\n";
- my $ScanView = Cwd::realpath("$RealBin/scan-view");
+ my $ScanView = "$AbsRealBin/../scan-view/scan-view";
if (! -x $ScanView) { $ScanView = "scan-view"; }
exec $ScanView, "$HtmlDir";
}