April 6, 2026
4:32 p.m.
When clang < 13 cross-compiles for Windows, it sets _MSC_VER to 1911 (< 1912). The #if/#elif chain in __config checked _MSC_VER < 1912 first, which prevented the elif branch from defining _LIBCPP_DEFER_NEW_TO_VCRUNTIME. This caused placement new/delete to be defined in both vcruntime_new.h and the libc++ <new> header, resulting in redefinition errors. Fix by checking _LIBCPP_ABI_MICROSOFT first to always define _LIBCPP_DEFER_NEW_TO_VCRUNTIME when using vcruntime, then handle the aligned allocation check as a nested condition. Also add fall back to the wmemchr() call or manual loop on clang < 13. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10577