Let hip-clang support --genco

This commit is contained in:
Yaxun Sam Liu
2018-11-13 22:28:00 -05:00
parent dc5aea4b03
commit 450f093231
6 changed files with 165 additions and 37 deletions
+5 -1
View File
@@ -334,7 +334,7 @@ foreach $arg (@ARGV)
$trimarg = $arg;
$trimarg =~ s/^\s+|\s+$//g; # Remive whitespace
my $swallowArg = 0;
if ($arg eq '-c') {
if ($arg eq '-c' or $arg eq '--genco') {
$compileOnly = 1;
$needCXXFLAGS = 1;
$needLDFLAGS = 0;
@@ -386,6 +386,10 @@ foreach $arg (@ARGV)
$swallowArg = 1;
}
if (($arg =~ /--genco/) and $HIP_PLATFORM eq 'clang' ) {
$arg = "--cuda-device-only";
}
if(($trimarg eq '-stdlib=libstdc++') and ($setStdLib eq 0))
{
$HIPCXXFLAGS .= $HCC_WA_FLAGS;