diff --git a/projects/clr/rocclr/runtime/platform/runtime.cpp b/projects/clr/rocclr/runtime/platform/runtime.cpp index cdbfe127df..e3cf1e877a 100644 --- a/projects/clr/rocclr/runtime/platform/runtime.cpp +++ b/projects/clr/rocclr/runtime/platform/runtime.cpp @@ -123,9 +123,12 @@ ReferenceCountedObject::release() static int reportHook(int reportType, char *message, int *returnValue) { - std::cerr << message; - ::exit(3); - return TRUE; + if (returnValue) { + *returnValue = 1; + } + std::cerr << message; + ::exit(3); + return TRUE; } #endif // DEBUG @@ -135,7 +138,7 @@ DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) switch (reason) { case DLL_PROCESS_ATTACH: # ifdef DEBUG - if (AMD_OCL_SUPPRESS_MESSAGE_BOX) { + if (!AMD_OCL_ENABLE_MESSAGE_BOX) { _CrtSetReportHook(reportHook); _set_error_mode(_OUT_TO_STDERR); } diff --git a/projects/clr/rocclr/runtime/utils/flags.hpp b/projects/clr/rocclr/runtime/utils/flags.hpp index a776d08dd0..587dc71c41 100644 --- a/projects/clr/rocclr/runtime/utils/flags.hpp +++ b/projects/clr/rocclr/runtime/utils/flags.hpp @@ -78,8 +78,8 @@ release(cstring, AMD_OCL_LINK_OPTIONS_APPEND, 0, \ "Append clLinkProgram()'s options") \ release(cstring, AMD_OCL_SC_LIB, 0, \ "Set shader compiler shared library name or path") \ -debug(bool, AMD_OCL_SUPPRESS_MESSAGE_BOX, false, \ - "Suppress the error dialog on Windows") \ +debug(bool, AMD_OCL_ENABLE_MESSAGE_BOX, false, \ + "Enable the error dialog on Windows") \ release(cstring, GPU_PRE_RA_SCHED, "default", \ "Allows setting of alternate pre-RA-sched") \ release(size_t, GPU_PINNED_XFER_SIZE, 16, \