aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutils/ccc-analyzer21
1 files changed, 11 insertions, 10 deletions
diff --git a/utils/ccc-analyzer b/utils/ccc-analyzer
index d99c7c7c33..4c47c098b7 100755
--- a/utils/ccc-analyzer
+++ b/utils/ccc-analyzer
@@ -257,8 +257,9 @@ my %ArchsSeen;
# 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'; }
@@ -273,16 +274,16 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
}
# 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;
@@ -290,8 +291,8 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
# 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.
@@ -315,8 +316,8 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
}
# Ignored options.
- if (defined $IgnoredOptionMap{$Arg}) {
- my $Cnt = $IgnoredOptionMap{$Arg};
+ if (defined $IgnoredOptionMap{$ArgKey}) {
+ my $Cnt = $IgnoredOptionMap{$ArgKey};
while ($Cnt > 0) {
++$i; --$Cnt;
}