Skip to content

A quick hack try to avoid the deserialized swiftmodule contains un-supported platform visionOS #69324

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dreampiggy
Copy link

@dreampiggy dreampiggy commented Oct 23, 2023

This is the quick fix for non-visionOS build (like iOS) when seeing the @available decl

This is the hack before Apple fully release the visionOS support on LLVM / Swift compiler, which is beyond this topic.

The quick hack is used to allows to consume swiftmodule built for iOS which contains @available (visionOS 1) attrs. This is common for some third-party libraries who distribute the swiftmodule only instead of source code.

Resolves #67857, fix #68034

The code changes just make this happenes on serialized AST consuming when finding the unsupported swift::PlatformKind :

  • Available Atrribute
@avaiable (iOS 10, visionOS 1, *)
class Foobar {}

=>

@avaiable (iOS 10, *)
class Foobar {}

@dreampiggy
Copy link
Author

@swift-ci Please smoke test

…orm visionOS

This is the quick fix for non-visionOS build (like iOS) when seeing the @available decl
@dreampiggy dreampiggy force-pushed the bugfix/visionOS_compiler_assertion branch from f940799 to 0151536 Compare October 24, 2023 08:04
@dreampiggy
Copy link
Author

@swift-ci Please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant