This change introduces a new compilation target platform to the Swift compiler - visionOS.
- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
When importing C functions with availability attributes, we don't
properly use that information to decide whether a symbol should be
weak_extern, causing load failures in dylibs that reference these
symbols when deployed to an older OS.
This is a very targeted fix and we need a better architecture for
deciding this.
rdar://problem/26359452
These tests emulate deploying back to an older OS where newer APIs are not
available by linking to an Objective-C framework where APIs have been
annotated to only be available in the far future and then moving the famework
aside so that it can't be found at run time.
These tests include some basics (global variables and classes), but the focus
is on Objective-C protocols to validate the change allowing types to
conform to protocols less available than the types themselves.
Swift SVN r30005