From 0f62034e00a8daccf2c95d40cfbb306784f5db8d Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Tue, 9 Apr 2019 15:01:50 -0400 Subject: [PATCH] hip-clang: add include path for hsa headers [ROCm/hip commit: c0e0ea9a1229cd4305e33f5eb2f8b02ea68c0f8b] --- projects/hip/bin/hipcc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index 22bf17f2f5..a7e2c28a45 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -204,6 +204,12 @@ if ($HIP_PLATFORM eq "clang") { ## Allow __fp16 as function parameter and return type. $HIPCXXFLAGS .= " -Xclang -fallow-half-arguments-and-returns -D__HIP_HCC_COMPAT_MODE__=1"; } + + if ($HIP_RUNTIME eq "HCC" ) { + $HSA_PATH=$ENV{'HSA_PATH'} // "/opt/rocm/hsa"; + $HIPCXXFLAGS .= " -isystem $HSA_PATH/include"; + } + } elsif ($HIP_PLATFORM eq "hcc") { $HIP_INCLUDE_PATH = "$HIP_PATH/include"; if (! defined $HIP_LIB_PATH) {