parent
bf1516c618
commit
f5a94e7114
|
@ -64,7 +64,10 @@ def analyze(clang, args,language,output,files,verbose,htmldir):
|
||||||
while i < len(args):
|
while i < len(args):
|
||||||
print_args.append(''.join([ '\'', args[i], '\'' ]))
|
print_args.append(''.join([ '\'', args[i], '\'' ]))
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
|
||||||
|
RunAnalyzer = 0;
|
||||||
|
|
||||||
if language.find("header") > 0:
|
if language.find("header") > 0:
|
||||||
target = remove_pch_extension(output)
|
target = remove_pch_extension(output)
|
||||||
command = 'cp'.split()
|
command = 'cp'.split()
|
||||||
|
@ -72,19 +75,25 @@ def analyze(clang, args,language,output,files,verbose,htmldir):
|
||||||
else:
|
else:
|
||||||
command = clang.split() + '-checker-cfref'.split()
|
command = clang.split() + '-checker-cfref'.split()
|
||||||
args = command + args;
|
args = command + args;
|
||||||
|
RunAnalyzer = 1
|
||||||
if htmldir is not None:
|
|
||||||
args.append('-o')
|
if verbose == 2:
|
||||||
print_args.append('-o')
|
print >> sys.stderr, '#SHELL (cd ' + os.getcwd() + ' && ' + ' '.join(command + print_args) + ')\n'
|
||||||
args.append(htmldir)
|
|
||||||
print_args.append(htmldir)
|
|
||||||
|
if RunAnalyzer and htmldir is not None:
|
||||||
|
args.append('-o')
|
||||||
|
print_args.append('-o')
|
||||||
|
args.append(htmldir)
|
||||||
|
print_args.append(htmldir)
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
# We MUST print to stderr. Some clients use the stdout output of
|
# We MUST print to stderr. Some clients use the stdout output of
|
||||||
# gcc for various purposes.
|
# gcc for various purposes.
|
||||||
print >> sys.stderr, ' '.join(command+print_args)
|
print >> sys.stderr, ' '.join(command+print_args)
|
||||||
print >> sys.stderr, '\n'
|
print >> sys.stderr, '\n'
|
||||||
|
|
||||||
|
|
||||||
subprocess.call(args)
|
subprocess.call(args)
|
||||||
|
|
||||||
def link(args):
|
def link(args):
|
||||||
|
@ -133,7 +142,10 @@ def main(args):
|
||||||
|
|
||||||
|
|
||||||
if os.environ.get('CCC_ANALYZER_VERBOSE') is not None:
|
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')
|
clang_env = os.environ.get('CLANG')
|
||||||
|
|
||||||
|
|
|
@ -662,6 +662,10 @@ if ($Verbose >= 2) {
|
||||||
$ENV{'CCC_ANALYZER_VERBOSE'} = 1;
|
$ENV{'CCC_ANALYZER_VERBOSE'} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($Verbose >= 3) {
|
||||||
|
$ENV{'CCC_ANALYZER_LOG'} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
# Run the build.
|
# Run the build.
|
||||||
|
|
||||||
RunBuildCommand(\@ARGV, $IgnoreErrors);
|
RunBuildCommand(\@ARGV, $IgnoreErrors);
|
||||||
|
|
Loading…
Reference in New Issue