my $OutputFormat = $ENV{'CCC_ANALYZER_OUTPUT_FORMAT'};
if (!defined $OutputFormat) { $OutputFormat = "html"; }
+# Get the config options.
+my $ConfigOptions = $ENV{'CCC_ANALYZER_CONFIG'};
+
# Determine the level of verbosity.
my $Verbose = 0;
if (defined $ENV{'CCC_ANALYZER_VERBOSE'}) { $Verbose = 1; }
}
}
}
+ if (defined $ConfigOptions) {
+ push @AnalyzeArgs, split '\s+', $ConfigOptions;
+ }
push @CmdArgs, @CompileOpts;
push @CmdArgs, $file;
sub SetEnv {
my $Options = shift @_;
foreach my $opt ('CC', 'CXX', 'CLANG', 'CLANG_CXX',
- 'CCC_ANALYZER_ANALYSIS', 'CCC_ANALYZER_PLUGINS') {
+ 'CCC_ANALYZER_ANALYSIS', 'CCC_ANALYZER_PLUGINS',
+ 'CCC_ANALYZER_CONFIG') {
die "$opt is undefined\n" if (!defined $opt);
$ENV{$opt} = $Options->{$opt};
}
--override-compiler
Always resort to the ccc-analyzer even when better interposition methods
are available.
+
+ -analyzer-config <options>
+
+ Provide options to pass through to the analyzer's -analyzer-config flag.
CONTROLLING CHECKERS:
my $StoreModel;
my $ConstraintsModel;
my $InternalStats;
+my @ConfigOptions;
my $OutputFormat = "html";
my $AnalyzerStats = 0;
my $MaxLoop = 0;
$OutputFormat = "plist-html";
next;
}
-
+
+ if ($arg eq "-analyzer-config") {
+ shift @ARGV;
+ push @ConfigOptions, "-analyzer-config", shift @ARGV;
+ next;
+ }
+
if ($arg eq "-no-failure-reports") {
$ENV{"CCC_REPORT_FAILURES"} = 0;
next;
# interposition.
my $CCC_ANALYZER_ANALYSIS = join ' ',@AnalysesToRun;
my $CCC_ANALYZER_PLUGINS = join ' ',@PluginsToLoad;
+my $CCC_ANALYZER_CONFIG = join ' ',@ConfigOptions;
my %Options = (
'CC' => $Cmd,
'CXX' => $CmdCXX,
'VERBOSE' => $Verbose,
'CCC_ANALYZER_ANALYSIS' => $CCC_ANALYZER_ANALYSIS,
'CCC_ANALYZER_PLUGINS' => $CCC_ANALYZER_PLUGINS,
+ 'CCC_ANALYZER_CONFIG' => $CCC_ANALYZER_CONFIG,
'OUTPUT_DIR' => $HtmlDir
);