Merge pull request #910 from aaronenyeshi/hip-code-obj-v3-passing
hipcc should consume -mcode-object-v3 flag
[ROCm/hip commit: d91bbf881c]
이 커밋은 다음에 포함됨:
@@ -317,6 +317,7 @@ my $runCmd = 1;
|
||||
my $buildDeps = 0;
|
||||
my $linkType = 1;
|
||||
my $setLinkType = 0;
|
||||
my $useCodeObjectV3 = 0;
|
||||
|
||||
my @options = ();
|
||||
my @inputs = ();
|
||||
@@ -420,6 +421,10 @@ foreach $arg (@ARGV)
|
||||
$swallowArg = 1;
|
||||
}
|
||||
|
||||
if (($trimarg eq '-mcode-object-v3') and ($HIP_PLATFORM eq 'clang') ) {
|
||||
$useCodeObjectV3 = 1;
|
||||
}
|
||||
|
||||
if (($arg =~ /--genco/) and $HIP_PLATFORM eq 'clang' ) {
|
||||
$arg = "--cuda-device-only";
|
||||
}
|
||||
@@ -753,6 +758,12 @@ if ($buildDeps and $HIP_PLATFORM eq 'clang') {
|
||||
$HIPCXXFLAGS .= " --cuda-host-only";
|
||||
}
|
||||
|
||||
if ($useCodeObjectV3 and $HIP_PLATFORM eq 'clang') {
|
||||
$HIPCXXFLAGS .= " -mcode-object-v3";
|
||||
} elsif ($HIP_PLATFORM eq 'clang') {
|
||||
$HIPCXXFLAGS .= " -mno-code-object-v3";
|
||||
}
|
||||
|
||||
# Add --hip-link only if there are no source files.
|
||||
if (!$needCXXFLAGS and $HIP_PLATFORM eq 'clang') {
|
||||
$HIPLDFLAGS .= " --hip-link";
|
||||
|
||||
새 이슈에서 참조
사용자 차단