SWDEV-277697 - Make sure hipcc can handle standard CXX options when being used with nvcc

Change-Id: I76b1f2943a660eefda858397218a775083b99228


[ROCm/clr commit: bfc6eed3d5]
这个提交包含在:
Jatin Chaudhary 编写, Jatin Chaudhary 于 2021-05-25 07:35:02 -04:00 提交
1 父节点 0db4210a86
当前提交 650d6031fa
1 个文件已更改
+9
+9
查看文件
@@ -376,6 +376,15 @@ foreach $arg (@ARGV)
$swallowArg = 1;
}
# nvcc does not handle standard compiler options properly
# This can prevent hipcc being used as standard CXX/C Compiler
# To fix this we need to pass -Xcompiler for options
if (($arg eq '-fPIC' or $arg =~ '-Wl,') and $HIP_COMPILER eq 'nvcc')
{
$HIPCXXFLAGS .= " -Xcompiler ".$arg;
$swallowArg = 1;
}
## process linker response file for hip-clang
## extract object files from static library and pass them directly to
## hip-clang in command line.