[cfe-commits] r51003 - in /cfe/trunk/utils: ccc-analyzer scan-build
Ted Kremenek
kremenek at apple.com
Mon May 12 15:07:15 PDT 2008
Author: kremenek
Date: Mon May 12 17:07:14 2008
New Revision: 51003
URL: http://llvm.org/viewvc/llvm-project?rev=51003&view=rev
Log:
Added internal command logging.
Modified:
cfe/trunk/utils/ccc-analyzer
cfe/trunk/utils/scan-build
Modified: cfe/trunk/utils/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc-analyzer?rev=51003&r1=51002&r2=51003&view=diff
==============================================================================
--- cfe/trunk/utils/ccc-analyzer (original)
+++ cfe/trunk/utils/ccc-analyzer Mon May 12 17:07:14 2008
@@ -64,7 +64,10 @@
while i < len(args):
print_args.append(''.join([ '\'', args[i], '\'' ]))
i += 1
-
+
+
+ RunAnalyzer = 0;
+
if language.find("header") > 0:
target = remove_pch_extension(output)
command = 'cp'.split()
@@ -72,19 +75,25 @@
else:
command = clang.split() + '-checker-cfref'.split()
args = command + args;
-
- if htmldir is not None:
- args.append('-o')
- print_args.append('-o')
- args.append(htmldir)
- print_args.append(htmldir)
+ RunAnalyzer = 1
+
+ if verbose == 2:
+ print >> sys.stderr, '#SHELL (cd ' + os.getcwd() + ' && ' + ' '.join(command + print_args) + ')\n'
+
+
+ if RunAnalyzer and htmldir is not None:
+ args.append('-o')
+ print_args.append('-o')
+ args.append(htmldir)
+ print_args.append(htmldir)
if verbose:
# We MUST print to stderr. Some clients use the stdout output of
# gcc for various purposes.
print >> sys.stderr, ' '.join(command+print_args)
print >> sys.stderr, '\n'
-
+
+
subprocess.call(args)
def link(args):
@@ -133,7 +142,10 @@
if os.environ.get('CCC_ANALYZER_VERBOSE') is not None:
- verbose =1
+ verbose = 1
+
+ if os.environ.get('CCC_ANALYZER_LOG') is not None:
+ verbose = 2
clang_env = os.environ.get('CLANG')
Modified: cfe/trunk/utils/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=51003&r1=51002&r2=51003&view=diff
==============================================================================
--- cfe/trunk/utils/scan-build (original)
+++ cfe/trunk/utils/scan-build Mon May 12 17:07:14 2008
@@ -662,6 +662,10 @@
$ENV{'CCC_ANALYZER_VERBOSE'} = 1;
}
+if ($Verbose >= 3) {
+ $ENV{'CCC_ANALYZER_LOG'} = 1;
+}
+
# Run the build.
RunBuildCommand(\@ARGV, $IgnoreErrors);
More information about the cfe-commits
mailing list