Let hipcc not escape space between obj files extracted from library
hipcc extracts bundles from static libraries and pass them to clang. It should
not escape spaces between objects extracted from library.
Fixes: SWDEV-246544
Change-Id: Iad3902f28a43a3986917ee37a49f10382c329940
[ROCm/clr commit: c1a498c219]
Tá an tiomantas seo le fáil i:
tiomanta ag
Yaxun Liu
tuismitheoir
492c85b8fb
tiomantas
1ca3e4696e
@@ -426,6 +426,7 @@ foreach $arg (@ARGV)
|
||||
# TODO: why are we removing it here?
|
||||
$trimarg =~ s/^\s+|\s+$//g; # Remive whitespace
|
||||
my $swallowArg = 0;
|
||||
my $escapeArg = 1;
|
||||
if ($arg eq '-c' or $arg eq '--genco' or $arg eq '-E') {
|
||||
$compileOnly = 1;
|
||||
$needLDFLAGS = 0;
|
||||
@@ -578,6 +579,7 @@ foreach $arg (@ARGV)
|
||||
close $in;
|
||||
close $out;
|
||||
$arg = "$new_arg -Wl,\@$new_file";
|
||||
$escapeArg = 0;
|
||||
} elsif (($arg =~ m/\.a$/ || $arg =~ m/\.lo$/) &&
|
||||
$HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'clang') {
|
||||
## process static library for hip-clang
|
||||
@@ -624,6 +626,7 @@ foreach $arg (@ARGV)
|
||||
$new_arg .= " $tmpdir/$libBaseName";
|
||||
}
|
||||
$arg = "$new_arg";
|
||||
$escapeArg = 0;
|
||||
if ($toolArgs =~ m/-Xlinker$/) {
|
||||
$toolArgs = substr $toolArgs, 0, -8;
|
||||
chomp $toolArgs;
|
||||
@@ -703,7 +706,7 @@ foreach $arg (@ARGV)
|
||||
# common characters such as alphanumerics.
|
||||
# Do the quoting here because sometimes the $arg is changed in the loop
|
||||
# Important to have all of '-Xlinker' in the set of unquoted characters.
|
||||
if (not $isWindows) { # Windows needs different quoting, ignore for now
|
||||
if (not $isWindows and $escapeArg) { # Windows needs different quoting, ignore for now
|
||||
$arg =~ s/[^-a-zA-Z0-9_=+,.\/]/\\$&/g;
|
||||
}
|
||||
$toolArgs .= " $arg" unless $swallowArg;
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir