diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp index d9d779ecb0..2df6f5058f 100644 --- a/rocclr/runtime/device/gpu/gpudevice.cpp +++ b/rocclr/runtime/device/gpu/gpudevice.cpp @@ -1188,16 +1188,6 @@ static void parseRequestedDeviceList(requestedDevices_t& requestedDevices) { } } -#if defined(_WIN32) && defined(DEBUG) -#include -#include -static int reportHook(int reportType, char* message, int* returnValue) { - fprintf(stderr, "%s", message); - ::exit(3); - return 1; -} -#endif // _WIN32 & DEBUG - bool Device::init() { CALuint numDevices = 0; bool useDeviceList = false; @@ -1217,13 +1207,6 @@ bool Device::init() { // osAssertSetStyle(OSASSERT_STYLE_LOGANDEXIT); #endif // WIN32 -#if defined(_WIN32) && defined(DEBUG) - if (::getenv("AMD_OCL_SUPPRESS_MESSAGE_BOX")) { - _CrtSetReportHook(reportHook); - _set_error_mode(_OUT_TO_STDERR); - } -#endif // _WIN32 & DEBUG - gslInit(); #if defined(_WIN32) && !defined(_WIN64) diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp index 21fc5c91d9..2eaa421ac6 100644 --- a/rocclr/runtime/device/pal/paldevice.cpp +++ b/rocclr/runtime/device/pal/paldevice.cpp @@ -1213,16 +1213,6 @@ static void parseRequestedDeviceList(const char* requestedDeviceList, } } -#if defined(_WIN32) && defined(DEBUG) -#include -#include -static int reportHook(int reportType, char* message, int* returnValue) { - fprintf(stderr, "%s", message); - ::exit(3); - return 1; -} -#endif // _WIN32 & DEBUG - bool Device::init() { uint32_t numDevices = 0; bool useDeviceList = false; diff --git a/rocclr/runtime/platform/runtime.cpp b/rocclr/runtime/platform/runtime.cpp index 21bd0d5f6a..0850d6cd24 100644 --- a/rocclr/runtime/platform/runtime.cpp +++ b/rocclr/runtime/platform/runtime.cpp @@ -111,7 +111,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) { switch (reason) { case DLL_PROCESS_ATTACH: #ifdef DEBUG - if (!AMD_OCL_ENABLE_MESSAGE_BOX) { + if (!::getenv("AMD_OCL_ENABLE_MESSAGE_BOX")) { _CrtSetReportHook(reportHook); _set_error_mode(_OUT_TO_STDERR); }