[hipcc] A workaround for [SWDEV-105366] HCC's omitting of system includes while compiling kernel code leads to 'file not found' error.

Missing includes are set explicitly.
Workaround is switched on by default, to disable it set HCC_SYS_INCLUDES_WA=0.

WA will be removed after fixing [SWDEV-105366].
这个提交包含在:
Evgeny Mankov
2016-10-18 22:38:04 +03:00
父节点 9d7a82d6bf
当前提交 5c7146eb62
+12
查看文件
@@ -91,6 +91,18 @@ if ($HIP_PLATFORM eq "hcc") {
$HIPCC=$HCC;
$HIPCXXFLAGS = $HCCFLAGS;
#### GCC system includes workaround ####
$WA = $ENV{'HCC_SYS_INCLUDES_WA'};
if (!defined($WA) || ${WA} ne "0") {
my $GCC_CUR_VER = `gcc -dumpversion`;
my $GPP_CUR_VER = `g++ -dumpversion`;
$GCC_CUR_VER =~ s/\R//g;
$GPP_CUR_VER =~ s/\R//g;
if (${GCC_CUR_VER} eq ${GPP_CUR_VER}) {
$HIPCXXFLAGS .= "-I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu/c++/${GCC_CUR_VER} -I/usr/include/c++/${GCC_CUR_VER}";
}
}
$HIPCXXFLAGS .= " -I$HIP_PATH/include/hip/hcc_detail/cuda";
$HIPCXXFLAGS .= " -I$HSA_PATH/include";
$HIPCXXFLAGS .= " -Wno-deprecated-register";