# Process the arguments.
foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
- my $Arg = $ARGV[$i];
-
+ my $Arg = $ARGV[$i];
+ my ($ArgKey) = split /=/,$Arg,2;
+
# Modes ccc-analyzer supports
if ($Arg eq '-E') { $Action = 'preprocess'; }
elsif ($Arg eq '-c') { $Action = 'compile'; }
}
# Options with possible arguments that should pass through to compiler.
- if (defined $CompileOptionMap{$Arg}) {
- my $Cnt = $CompileOptionMap{$Arg};
+ if (defined $CompileOptionMap{$ArgKey}) {
+ my $Cnt = $CompileOptionMap{$ArgKey};
push @CompileOpts,$Arg;
while ($Cnt > 0) { ++$i; --$Cnt; push @CompileOpts, $ARGV[$i]; }
next;
}
# Options with possible arguments that should pass through to linker.
- if (defined $LinkerOptionMap{$Arg}) {
- my $Cnt = $LinkerOptionMap{$Arg};
+ if (defined $LinkerOptionMap{$ArgKey}) {
+ my $Cnt = $LinkerOptionMap{$ArgKey};
push @LinkOpts,$Arg;
while ($Cnt > 0) { ++$i; --$Cnt; push @LinkOpts, $ARGV[$i]; }
next;
# Options with possible arguments that should pass through to both compiler
# and the linker.
- if (defined $CompilerLinkerOptionMap{$Arg}) {
- my $Cnt = $CompilerLinkerOptionMap{$Arg};
+ if (defined $CompilerLinkerOptionMap{$ArgKey}) {
+ my $Cnt = $CompilerLinkerOptionMap{$ArgKey};
# Check if this is an option that should have a unique value, and if so
# determine if the value was checked before.
}
# Ignored options.
- if (defined $IgnoredOptionMap{$Arg}) {
- my $Cnt = $IgnoredOptionMap{$Arg};
+ if (defined $IgnoredOptionMap{$ArgKey}) {
+ my $Cnt = $IgnoredOptionMap{$ArgKey};
while ($Cnt > 0) {
++$i; --$Cnt;
}