diff --git a/opencl/amdocl/cl_runtime.cpp b/opencl/amdocl/cl_runtime.cpp index 652aa39129..c4b9f42502 100644 --- a/opencl/amdocl/cl_runtime.cpp +++ b/opencl/amdocl/cl_runtime.cpp @@ -19,6 +19,7 @@ THE SOFTWARE. */ #include "thread/thread.hpp" +#include "platform/runtime.hpp" #include #include @@ -45,6 +46,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) { #endif // DEBUG break; case DLL_PROCESS_DETACH: + amd::Runtime::setLibraryDetached(); break; case DLL_THREAD_DETACH: { amd::Thread* thread = amd::Thread::current(); @@ -54,4 +56,4 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) { break; } return true; -} \ No newline at end of file +}