Skip to content

Commit a118509

Browse files
authored
Merge pull request #127 from ROCm-Developer-Tools/amd/dev/kzhuravl/fix-hipcc-psdb
[fix] Add '-x cu' for c++ file extensions
2 parents 2758d91 + 3800dbd commit a118509

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

amd/hipcc/bin/hipcc.pl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ sub get_normalized_path {
230230
my $hasOMPTargets = 0; # If OMP targets is mentioned
231231
my $hasC = 0; # options contain a c-style file
232232
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)
234233
my $hasHIP = 0; # options contain a hip-style file (HIP-Clang must pass offloading options)
235234
my $printHipVersion = 0; # print HIP version
236235
my $printCXXFlags = 0; # print HIPCXXFLAGS
@@ -441,6 +440,9 @@ sub get_normalized_path {
441440
$needCXXFLAGS = 1;
442441
if ($HIP_COMPILE_CXX_AS_HIP eq '0' or $HIP_PLATFORM ne "amd" or $hasOMPTargets eq 1) {
443442
$hasCXX = 1;
443+
if ($HIP_PLATFORM eq "nvidia") {
444+
$toolArgs .= " -x cu";
445+
}
444446
} elsif ($HIP_PLATFORM eq "amd") {
445447
$hasHIP = 1;
446448
$toolArgs .= " -x hip";
@@ -451,7 +453,6 @@ sub get_normalized_path {
451453
$hasHIP = 1;
452454
$toolArgs .= " -x hip";
453455
} elsif ($HIP_PLATFORM eq "nvidia") {
454-
$hasCU = 1;
455456
$toolArgs .= " -x cu";
456457
}
457458
}

0 commit comments

Comments
 (0)