Define __HIPCC__ flag at compile time when using HIPCC on HCC path

Change-Id: I5e967e0e2327264d5d3b0ca705c2504fcd33d75e


[ROCm/clr commit: be95cc914f]
Tá an tiomantas seo le fáil i:
pensun
2017-02-28 16:20:48 -06:00
tuismitheoir 8c237b0837
tiomantas 077e789db5
D'athraigh 2 comhad le 5 breiseanna agus 4 scriosta
+1 -1
Féach ar an gComhad
@@ -92,7 +92,7 @@ if ($HIP_PLATFORM eq "hcc") {
# HCC* may be used to compile src/hip_hcc.o (and also feed the HIPCXXFLAGS below)
$HCC = "$HCC_HOME/bin/hcc";
$HCCFLAGS = "-hc -I$HCC_HOME/include ";
$HCCFLAGS = "-hc -D__HIPCC__ -I$HCC_HOME/include ";
$HIPCC=$HCC;
$HIPCXXFLAGS = $HCCFLAGS;
+4 -3
Féach ar an gComhad
@@ -27,14 +27,14 @@ THE SOFTWARE.
// Other compiler (GCC,ICC,etc) need to set one of these macros explicitly
#if defined(__HCC__)
#define __HIP_PLATFORM_HCC__
#define __HIPCC__
#if defined(__HCC_ACCELERATOR__) && (__HCC_ACCELERATOR__ != 0)
#define __HIP_DEVICE_COMPILE__ 1
#else
#define __HIP_DEVICE_COMPILE__ 0
#endif
#endif
#endif //__HCC__
// Auto enable __HIP_PLATFORM_NVCC__ if compiling with NVCC
#if defined(__NVCC__)
@@ -48,7 +48,8 @@ THE SOFTWARE.
#else
#define __HIP_DEVICE_COMPILE__ 0
#endif
#endif
#endif //__NVCC__
#if __HIP_DEVICE_COMPILE__ == 0