Commit Graph

4 Commits

Author SHA1 Message Date
Brent Royal-Gordon
3494c0bd88 [TypeChecker] Rephrase platforms in availability diagnostics
This does several different things to improve how platforms are described in availability diagnostics:

• Mentions the platform in diagnostics for platform-specific @available(unavailable) attributes.
• Replaces “OS X” with “macOS”.
• Replaces “fooOS application extension” with “application extensions for fooOS”.
• Replaces “on fooOS” with “in fooOS”.

Fixes <rdar://problem/49963341>.
2019-04-30 16:32:43 -07:00
Jordan Rose
2818969c23 [test] Accept that swiftc should infer the running OS as the target
Specifically, this is about the /version/ of the running OS.
Previously, this was only autodetected for the interpreter, with the
compiler defaulting to the earliest version of macOS supported by
Swift (10.9); picking the current running OS seems more useful. LLVM
changed their default behavior recently, so this doesn't actually
require any implementation changes.

This only affects macOS today, because it only affects compiling
without an explicit target (i.e. not cross-compiling) on an OS with
cross-version binary compatibility (i.e. not Linux).

rdar://problem/29948658
2017-11-28 11:36:00 -08:00
Jordan Rose
5406982ede [test] Disable the failing part of availability_host_os.swift. (#11268)
LLVM r307372 makes it so that the current running macOS version is
always chosen as the default target. It's unclear whether that's the
behavior we want or not; deciding that is tracked by
rdar://problem/29948658. For now, just disable that part of the test.
2017-07-31 11:16:30 -07:00
Jordan Rose
23f25e1de7 In immediate mode, detect the host OS version on Apple platforms.
This allows script mode to pick up the current version of macOS
instead of defaulting to 10.9, making it unnecessary to write #available.
A -target flag can still override this if you're trying to write a
portable script.

The logic is a little tortured to avoid having to actually link to
Foundation.framework or libobjc.

Finishes rdar://problem/29433205.
2016-12-22 17:01:33 -08:00