[swift-evolution] #if os(Windows) and MSVC/Cygwin Compatibility
tinysun.net at gmail.com
Tue May 3 00:00:28 CDT 2016
This is continued from PR #2351(https://github.com/apple/swift/pull/2351).
Here is the brief history. (To avoid confusion, I used MSVC refer to
*-*-windows-msvc and Cygwin refer to *-*-windows-cygnus in LLVM.)
I needed the #if method to distinct MSVC from Cygwin, for mapping the Int
to CLongLong not CLong on MSVC.
In PR #2351, I simply added 'os(Cygwin)' and restrict 'os(Windows)' to
*-*-windows-msvc from *-*-windows-*, this solved my problem.
Jake(@jakepetroules) pointed out that Cygwin is not an OS and it will never
fixed to avoid breaking user applications.
There is more participants and opinions, briefly,
- introduce another new one such as 'env(cygnus)' or 'triple(Cygwin)'
- the usability of the common condition 'os(Windows)' for *-*-windows-*
- fundamentally, what do we gain from asking which os() is in use?
- 'env()' is too vague
- what the right questions?
Forgive me the poor quotations of valuable opinions.
I hope we find out the solution or method everybody satisfied.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution