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
Add an option to build the concurrency library for back deployment. #39051
Add an option to build the concurrency library for back deployment. #39051
Conversation
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
@swift-ci please build toolchain |
macOS Toolchain Install command |
78996a3
to
507d4d4
Compare
@swift-ci please smoke test |
Introduce an additional build product to build-script to build back-deployable concurrency libraries. These libraries would need to be embedded in apps deployed prior to macOS 12/iOS 15 to support concurrency. The built-script option `--back-deploy-concurrency` can be provided to build these back-deployment libraries. They are built in addition to the normal concurrency libraries, as a separate product that installs into `lib/swift-5.5/<platform>` within the toolchain. The macro `SWIFT_CONCURRENCY_BACK_DEPLOYMENT` is set when building the concurrency library, so that we can adapt the implementation to older OS's.
…yment. When enabling the build of the back-deployable concurrency library via the build-script option `--back-deploy-concurrency`, also build the compiler and (main) concurrency library to support older deployment targets. Building the compiler for older deployment targets is effectively the same as implicitly passing `-Xfrontend -enable-experimental-back-deploy-concurrency`. That option should probably go away. Building the primary _Concurrency library for back-deployment means setting the "SwiftStdlib 5.5" availability back to the earlier deployment targets. This should have no effect on how the _Concurrency library binary is built, but it does ensure that the right availability annotations are in the _Concurrency module.
…ncy. When build-script is given `--back-deploy-concurrency`, also use that to build other parts of Swift with the back-deployed versions: * The compiler allows async and actors to be defined with the back-deployed availability, e.g., the same as `-Xfrontend -enable-experimental-back-deploy-concurrency`. (The latter will go away soon) * The standard library unit testing framework and distributed actors library are build with the older OS versions. * The tests use the older OS versions, with some adjustments to make them agnostic to the back-deployment setting.
507d4d4
to
ebd7b49
Compare
@swift-ci please test |
Will this work with XCFrameworks as well? Will the library be included in the distributed frameworks? |
@swift-ci please build toolchain |
Is there a toolchain build, or is it planned to be included in the future Xcode versions? |
Is there any way to make it work on iOS 12 as well? |
Introduce an additional build product to build-script to build
back-deployable concurrency libraries. These libraries would need to
be embedded in apps deployed prior to macOS 12/iOS 15 to support
concurrency.
The built-script option
--back-deploy-concurrency
can be provided tobuild these back-deployment libraries. They are built in addition to
the normal concurrency libraries, as a separate product that installs
into
lib/swift-5.5/<platform>
within the toolchain. The macroSWIFT_CONCURRENCY_BACK_DEPLOYMENT
is set when building theconcurrency library, so that we can adapt the implementation to older
OS's.
When building the back-deployment libraries, the compiler will
accept async functions and actors with earlier deployment
targets. In this case, the modules themselves will reflect the
earlier availability. Testing has been updated to work in
either configuration.