llvm-c166/lldb/source/Initialization
robk-dev 85413b1277
[lldb] Guard CRT debug report calls with _MSC_VER (#216710)
mingw-w64's `crtdbg.h` expands `_CrtSetReportMode` and
`_CrtSetReportFile` to
no-ops unless `_DEBUG` is set, and declares them as real debug-CRT
imports
when it is. 

That macro means both "this code is built in debug mode" and "a debug
CRT is
linked", which go together for MSVC but not for MinGW, where a debug
build
normally still links the release CRT. A debug MinGW build therefore
compiles
the `LLDB_DISABLE_CRASH_DIALOG` path but fails to link it; release MinGW
builds get the no-op macros, which is why the distributed MinGW packages
never hit it.

Guard the calls with `_MSC_VER`. `SetErrorMode` above them is a Win32
API and
stays unconditional.

Assisted-by: Claude Fable 5
2026-08-18 15:27:18 +02:00
..
CMakeLists.txt
SystemInitializer.cpp
SystemInitializerCommon.cpp [lldb] Guard CRT debug report calls with _MSC_VER (#216710) 2026-08-18 15:27:18 +02:00
SystemLifetimeManager.cpp [lldb] Catch missing calls to SystemLifetimeManager::Initialize (#185536) 2026-03-11 10:32:33 -07:00