[swift-evolution] #if os(Windows) and MSVC/Cygwin Compatibility

Joe Groff jgroff at apple.com
Tue May 3 23:43:07 CDT 2016


> On May 3, 2016, at 9:40 PM, Chris Lattner <clattner at apple.com> wrote:
> 
> 
>> On May 3, 2016, at 9:39 PM, Joe Groff <jgroff at apple.com> wrote:
>> 
>> 
>>> On May 3, 2016, at 9:27 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> MSVC and MinGW (again, AFAIK) use the same C ABI, and thus could be treated as the same target.
>>> 
>> Part of the problem is that MSVC and Mingw *don't* share a C ABI or runtime. Only 'stdcall' and COM stuff from the Win32 system APIs is portable between them at the binary level. 
> 
> I thought that MinGW worked with the system libc?

There's no such thing on Windows (at least, until Windows 10, which introduced yet another "universal" C runtime). Older versions of mingw used to link against MSVCRT.DLL, which was an unsupported vintage C runtime intended for SPI use only, but now use their own glibc-derived C library.

-Joe


More information about the swift-evolution mailing list