@@ -230,7 +230,6 @@ sub get_normalized_path {
230
230
my $hasOMPTargets = 0; # If OMP targets is mentioned
231
231
my $hasC = 0; # options contain a c-style file
232
232
my $hasCXX = 0; # options contain a cpp-style file (NVCC must force recognition as GPU file)
233
- my $hasCU = 0; # options contain a cu-style file (HCC must force recognition as GPU file)
234
233
my $hasHIP = 0; # options contain a hip-style file (HIP-Clang must pass offloading options)
235
234
my $printHipVersion = 0; # print HIP version
236
235
my $printCXXFlags = 0; # print HIPCXXFLAGS
@@ -441,6 +440,9 @@ sub get_normalized_path {
441
440
$needCXXFLAGS = 1;
442
441
if ($HIP_COMPILE_CXX_AS_HIP eq ' 0' or $HIP_PLATFORM ne " amd" or $hasOMPTargets eq 1) {
443
442
$hasCXX = 1;
443
+ if ($HIP_PLATFORM eq " nvidia" ) {
444
+ $toolArgs .= " -x cu" ;
445
+ }
444
446
} elsif ($HIP_PLATFORM eq " amd" ) {
445
447
$hasHIP = 1;
446
448
$toolArgs .= " -x hip" ;
@@ -450,8 +452,8 @@ sub get_normalized_path {
450
452
if ($HIP_PLATFORM eq " amd" ) {
451
453
$hasHIP = 1;
452
454
$toolArgs .= " -x hip" ;
453
- } else {
454
- $hasCU = 1 ;
455
+ } elsif ( $HIP_PLATFORM eq " nvidia " ) {
456
+ $toolArgs .= " -x cu " ;
455
457
}
456
458
}
457
459
}
@@ -532,10 +534,6 @@ sub get_normalized_path {
532
534
$ENV {HCC_EXTRA_LIBRARIES }=" \n " ;
533
535
}
534
536
535
- if ($hasCXX and $HIP_PLATFORM eq ' nvidia' ) {
536
- $HIPCXXFLAGS .= " -x cu" ;
537
- }
538
-
539
537
if ($buildDeps and $HIP_PLATFORM eq ' nvidia' ) {
540
538
$HIPCXXFLAGS .= " -M -D__CUDACC__" ;
541
539
$HIPCFLAGS .= " -M -D__CUDACC__" ;
0 commit comments