Output file name should not change flags picked for compiler (#1938)
Fixes SWDEV-207362, The output file name should not contribute to picking up the right flags for the compiler. This fix solves issues when the output has conflicting extensions which confuses hipcc to treat them as the source files and add the required flags for them. PS: Output file refers to the file followed by -o Change-Id: I1095966c11143ad73e81fabc35b4e9de5d3afada Example: hipcc test.o -o test.hip will add the flags for .hip compilation ignoring the fact that it is an output file
Este commit está contenido en:
cometido por
Aaron Enye Shi
padre
5b96f38c1e
commit
bb62f8553f
@@ -391,6 +391,7 @@ my $toolArgs = ""; # arguments to pass to the hcc or nvcc tool
|
||||
my $optArg = ""; # -O args
|
||||
my $targetOpt = '--amdgpu-target=';
|
||||
my $targetsStr = "";
|
||||
my $skipOutputFile = 0; # file followed by -o should not contibute in picking compiler flags
|
||||
|
||||
foreach $arg (@ARGV)
|
||||
{
|
||||
@@ -402,8 +403,16 @@ foreach $arg (@ARGV)
|
||||
$needCXXFLAGS = 1;
|
||||
$needLDFLAGS = 0;
|
||||
}
|
||||
|
||||
if ($skipOutputFile) {
|
||||
$toolArgs .= " $arg";
|
||||
$skipOutputFile = 0;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($arg eq '-o') {
|
||||
$needLDFLAGS = 1;
|
||||
$skipOutputFile = 1;
|
||||
}
|
||||
|
||||
if(($trimarg eq '-stdlib=libc++') and ($setStdLib eq 0))
|
||||
|
||||
Referencia en una nueva incidencia
Block a user