Commit Graph

4 Commits

Author SHA1 Message Date
Graham Batty
dc6a776d10 stdlib: Use config directives to work without objective-c.
Swift SVN r23211
2014-11-10 20:06:25 +00:00
Graham Batty
373414864d Revert "Use config directives to carve out a 'portable' kernel stdlib."
This reverts commit r23202 pending further discussion.

Swift SVN r23205
2014-11-10 18:46:42 +00:00
Graham Batty
dfa260fab1 Use config directives to carve out a 'portable' kernel stdlib.
Swift SVN r23202
2014-11-10 18:03:09 +00:00
Devin Coughlin
9c7d27c4eb Add an OS version check for API availability to standard library and runtime.
This patch adds a compiler entry point to the standard library that checks
whether the running OS version is greater than or equal to a given version
triple. The idea is that #os(...) will get SILGen'd into a call to this
function.

The standard library function calls a runtime function to actually get the OS
version. This runtime function uses -[NSProcessInfo operatingSystemVersion] when
possible, otherwise it loads the SystemVersion plist. When running under the
simulator, we use an environmental variable set by the simulator to look up the
version for the simulated OS and not the host OS.

At the moment, there is no caching for version info. I will add this in a later
patch.


Swift SVN r22303
2014-09-26 18:26:29 +00:00