From 7995ec9e38e96fac7f27f0aa60270b442ba457a5 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Tue, 11 May 2021 13:49:44 -0400 Subject: [PATCH] SWDEV-273235 - Fix HIP PCH build hip_rtc.cpp refers to the symbol __hipGetPCH(), but that one can only be found in hip_global.cpp. It's not referenced anywhere else, hence it should be moved. Change-Id: Ifc67b2f3b1b8344dec0e6c30d083d62288fb5e24 [ROCm/clr commit: 20eff6c298fe5b10148b03749a0aded2d1ebf85b] --- projects/clr/hipamd/rocclr/hip_global.cpp | 9 --------- projects/clr/hipamd/rocclr/hip_rtc.cpp | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/projects/clr/hipamd/rocclr/hip_global.cpp b/projects/clr/hipamd/rocclr/hip_global.cpp index 247fbb645a..00c29013a2 100755 --- a/projects/clr/hipamd/rocclr/hip_global.cpp +++ b/projects/clr/hipamd/rocclr/hip_global.cpp @@ -5,15 +5,6 @@ #include "hip_code_object.hpp" #include "platform/program.hpp" -#ifdef __HIP_ENABLE_PCH -extern const char __hip_pch[]; -extern unsigned __hip_pch_size; -void __hipGetPCH(const char** pch, unsigned int *size) { - *pch = __hip_pch; - *size = __hip_pch_size; -} -#endif - namespace hip { //Device Vars diff --git a/projects/clr/hipamd/rocclr/hip_rtc.cpp b/projects/clr/hipamd/rocclr/hip_rtc.cpp index b7f373a264..66b6ad6e43 100755 --- a/projects/clr/hipamd/rocclr/hip_rtc.cpp +++ b/projects/clr/hipamd/rocclr/hip_rtc.cpp @@ -23,6 +23,15 @@ #include #include "platform/program.hpp" +#ifdef __HIP_ENABLE_PCH +extern const char __hip_pch[]; +extern unsigned __hip_pch_size; +void __hipGetPCH(const char** pch, unsigned int *size) { + *pch = __hip_pch; + *size = __hip_pch_size; +} +#endif + namespace hiprtc { thread_local hiprtcResult g_lastRtcError = HIPRTC_SUCCESS; }