Saleem Abdulrasool 219b5a0de4
build: alter condition for adding _DEBUG CPP macro (#183120)
Unlike many other platforms, Microsoft does not maintain ABI across
debug and release binaries. When building LLVM in release+asserts, the
injection of `_DEBUG` which controls the behaviour of `assert` as per
the C specification, also alters the behaviour of the C/C++ runtime's
internal assertions and relies on debug only symbols. As such, the
`_DEBUG` macro handling is not _MSVC_ specific but rather MS STL and
UCRT specific. Adjust the build condition from `MSVC` to `WIN32` to
indicate that this is a Windows-ism. Note that `MINGW` is the proper way
to check for MinGW, so that should not be impacted by this change.
Making this more precise permits the use of `clang` and `clang++` to
build LLVM for Windows.
2026-02-25 08:39:03 -08:00
..

See docs/CMake.html for instructions on how to build LLVM with CMake.