Add initial support for clang

This commit is contained in:
Laurent Morichetti
2018-02-28 12:31:26 -08:00
parent 1f0ad7e54c
commit f8b0c96462
3 changed files with 65 additions and 3 deletions
+2 -2
View File
@@ -26,12 +26,12 @@ THE SOFTWARE.
// Common code included at start of every hip file.
// Auto enable __HIP_PLATFORM_HCC__ if compiling with HCC
// Other compiler (GCC,ICC,etc) need to set one of these macros explicitly
#if defined(__HCC__)
#if defined(__HCC__) || (defined(__clang__) && defined(__HIPCC__))
#define __HIP_PLATFORM_HCC__
#endif //__HCC__
// Auto enable __HIP_PLATFORM_NVCC__ if compiling with NVCC
#if defined(__NVCC__)
#if defined(__NVCC__) || (defined(__clang__) && defined(__CUDACC__))
#define __HIP_PLATFORM_NVCC__
#ifdef __CUDACC__
#define __HIPCC__