зеркало из https://github.com/microsoft/clang-1.git
Discard extra -isysroot options. This fixes:
<rdar://problem/6253141> Parser rejection occurs when command line has more than one -isysroot switch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56790 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
58df184ef9
Коммит
a30730e5cd
|
@ -215,6 +215,10 @@ my %LangMap = (
|
|||
'mi' => 'objective-c-cpp-output'
|
||||
);
|
||||
|
||||
my %UniqueOptions = (
|
||||
'-isysroot' => 0
|
||||
);
|
||||
|
||||
##----------------------------------------------------------------------------##
|
||||
# Main Logic.
|
||||
##----------------------------------------------------------------------------##
|
||||
|
@ -225,6 +229,7 @@ my @LinkOpts;
|
|||
my @Files;
|
||||
my $Lang;
|
||||
my $Output;
|
||||
my %Uniqued;
|
||||
|
||||
# Forward arguments to gcc.
|
||||
my $Status = system($CC,@ARGV);
|
||||
|
@ -287,6 +292,17 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) {
|
|||
my $Cnt = $CompilerLinkerOptionMap{$Arg};
|
||||
push @CompileOpts,$Arg;
|
||||
push @LinkOpts,$Arg;
|
||||
|
||||
# Check if this is an option that should have a unique value, and if so
|
||||
# determine if the value was checked before.
|
||||
if ($UniqueOptions{$Arg}) {
|
||||
if (defined $Uniqued{$Arg}) {
|
||||
$i += $Cnt;
|
||||
next;
|
||||
}
|
||||
$Uniqued{$Arg} = 1;
|
||||
}
|
||||
|
||||
while ($Cnt > 0) {
|
||||
++$i; --$Cnt;
|
||||
push @CompileOpts, $ARGV[$i];
|
||||
|
|
Загрузка…
Ссылка в новой задаче