https://bugs.winehq.org/show_bug.cgi?id=58040
--- Comment #2 from Mihail Ivanchev contact@ivanchev.net --- (In reply to Dmitry Timoshkov from comment #1)
This might be a duplicate of the bug 54889. Are you compiling with a 32-bit toolchain by any chance?
Dmitry, I don't think so. It's 64-bit clang and I have no out of memory errors.