Skip to content

[6.0 🍒] Introduce VisionOS Platform #73062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Apr 16, 2024

Cherry-pick of #72834

Explanation: 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.

Risk: Low, additional code-paths should have little effect on compilation for existing platforms.
Testing: Automated tests added to the compiler test suite. Existing tests adjusted for the new platform.
Reviewed By: @tshortli, @ktoso, @CodaFi, @nkcsgexi, @shahmishal

@artemcm artemcm added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels Apr 16, 2024
@artemcm artemcm requested a review from a team as a code owner April 16, 2024 19:48
@artemcm
Copy link
Contributor Author

artemcm commented Apr 16, 2024

@swift-ci test

@@ -609,6 +609,13 @@ importer::getNormalInvocationArguments(
if (clangSupportsPragmaAttributeWithSwiftAttr())
invocationArgStrs.push_back("-D__SWIFT_ATTR_SUPPORTS_SENDABLE_DECLS=1");

if (triple.isXROS()) {
// FIXME: This is a gnarly hack until some macros get adjusted in the SDK.
invocationArgStrs.insert(invocationArgStrs.end(), {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: delete this.

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.
@artemcm artemcm force-pushed the 60UpstreamVisionOS branch from 4be85da to 0b64745 Compare April 22, 2024 18:04
@artemcm
Copy link
Contributor Author

artemcm commented Apr 22, 2024

@swift-ci test

1 similar comment
@artemcm
Copy link
Contributor Author

artemcm commented Apr 22, 2024

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Apr 22, 2024

@swift-ci test macOS platform

@artemcm artemcm merged commit f04aaa2 into swiftlang:release/6.0 Apr 23, 2024
@artemcm artemcm deleted the 60UpstreamVisionOS branch April 23, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants