Introduce VisionOS Platform

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.
This commit is contained in:
Artem Chikin
2024-04-03 11:02:58 -07:00
parent 0ac6d36083
commit 1f14158a1d
130 changed files with 1334 additions and 101 deletions

View File

@@ -1690,6 +1690,12 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
genericSubInvocation.setSDKPath(SearchPathOpts.getSDKPath().str());
}
if (SearchPathOpts.PlatformAvailabilityInheritanceMapPath) {
GenericArgs.push_back("-platform-availability-inheritance-map-path");
GenericArgs.push_back(ArgSaver.save(*SearchPathOpts.PlatformAvailabilityInheritanceMapPath));
genericSubInvocation.setPlatformAvailabilityInheritanceMapPath(*SearchPathOpts.PlatformAvailabilityInheritanceMapPath);
}
genericSubInvocation.getFrontendOptions().InputMode
= FrontendOptions::ParseInputMode::SwiftModuleInterface;
if (!SearchPathOpts.RuntimeResourcePath.empty()) {