That makes sense to me, but then I'm confused, why do we use -mabi=ms in that case?
Mainly to ensure that internal functions also use msabi, because calling between msabi and sysv is expensive on x86-64.
Note also that our headers should be usable from Winelib apps that link with Unix libs, and in that case using -mabi=ms is not an option.