From 43d194a641a261bed9db5fbbee0ceec40f272be7 Mon Sep 17 00:00:00 2001 From: Michael LIAO Date: Fri, 14 Jun 2019 13:31:51 -0400 Subject: [PATCH] [hipcc] Revise include path calculation. - Once HIP_VDI_HOME is defined but HIP_CLANG_INCLUDE_PATH is not, calculate it directly without HIP_CLANG_PATH is defined or not; Otherwise, we may leave HIP_CLANG_INCLUDE_PATH undefined, if clang is not installed following the official way (so far, HIP-Clang breaks that), we may leave HIP_CLANG_INCLUDE_PATH undefined before its uses. [ROCm/clr commit: c3604d3120cb3b658b44bcf00d42f7d579ed94a3] --- projects/clr/hipamd/bin/hipcc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/clr/hipamd/bin/hipcc b/projects/clr/hipamd/bin/hipcc index 58c8fe45c9..5b25d01fcf 100755 --- a/projects/clr/hipamd/bin/hipcc +++ b/projects/clr/hipamd/bin/hipcc @@ -118,6 +118,9 @@ if ($HIP_RUNTIME eq "VDI" and !defined $HIP_VDI_HOME) { if (defined $HIP_VDI_HOME) { if (!defined $HIP_CLANG_PATH and (-e "$HIP_VDI_HOME/bin/clang" or -e "$HIP_VDI_HOME/bin/clang.exe")) { $HIP_CLANG_PATH = "$HIP_VDI_HOME/bin"; + } + # With HIP_VDI_HOME defined, assume the installation of clang components, including headers. + if (!defined $HIP_CLANG_INCLUDE_PATH) { $HIP_CLANG_INCLUDE_PATH = "$HIP_VDI_HOME/include/clang"; } if (!defined $DEVICE_LIB_PATH and -e "$HIP_VDI_HOME/lib/bitcode") {