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

Chris Lattner clattner at apple.com
Wed May 4 00:13:02 CDT 2016


> On May 3, 2016, at 9:43 PM, Joe Groff <jgroff at apple.com> wrote:
> 
> 
>> 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.

Huh ok.  Well, I guess it too is its own OS or architecture.  Does anyone know how dlang or another language that grew-up-on-windows-then-got-ported-to-gcc-and-llvm handles this?

-Chris


More information about the swift-evolution mailing list