From: Vitaly Lipatov <lav@etersoft.ru> Clang < 13 reports __has_feature(cxx_constexpr_string_builtins) as true but does not inline __builtin_wmemchr for Windows targets, generating an external call to wmemchr instead. Since Wine's ucrtbase does not export wmemchr (it is defined as static inline in wchar.h), this causes an undefined symbol error at link time for modules using libc++ (e.g. icu). Fall back to the wmemchr() call or manual loop on clang < 13. --- include/msvcrt/__string | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/msvcrt/__string b/include/msvcrt/__string index b919ff80b67..74328903d1e 100644 --- a/include/msvcrt/__string +++ b/include/msvcrt/__string @@ -374,7 +374,7 @@ char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __ { if (__n == 0) return nullptr; -#if __has_feature(cxx_constexpr_string_builtins) +#if __has_feature(cxx_constexpr_string_builtins) && __clang_major__ >= 13 return __builtin_wmemchr(__s, __a, __n); #elif _LIBCPP_STD_VER <= 14 return wmemchr(__s, __a, __n); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10577