Skip to content

Separate CMake option for "build concurrency lib" and "import concurrency implicitly" #37698

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

Conversation

DougGregor
Copy link
Member

Explanation: The CMake option SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY was originally
meant to imply that we should build the _Concurrency module, which it still
does. However, to support minimal stdlib builds, it also became a way
to configure the compiler to avoid implicitly importing the
_Concurrency module. However, we build configurations of Swift where
we want the implicit import but don't want to build the _Concurrency
library. Use a new, different option
(SWIFT_IMPLICIT_CONCURRENCY_IMPORT) for the "implicit import"
behavior within the compiler, which defaults to "true", and disable
that for minimal stdlib builds.

Scope: Only affects minimal standard library builds and builds without the concurrency library.

Main Branch PR: #37686

Resolves: rdar://78544947

Risk: Low

Reviewed By: @davezarzycki

Testing: Normal regression testing via CI

…ency lib"

The CMake option `SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY` was originally
meant to imply that we should build the _Concurrency module, which it still
does. However, to support minimal stdlib builds, it also became a way
to configure the compiler to avoid implicitly importing the
_Concurrency module. However, we build configurations of Swift where
we want the implicit import but don't want to build the _Concurrency
library. Use a new, different option
(`SWIFT_IMPLICIT_CONCURRENCY_IMPORT`) for the "implicit import"
behavior within the compiler, which defaults to "true", and disable
that for minimal stdlib builds.

Fixes rdar://78544947.

(cherry picked from commit 4c1c8ed)
@DougGregor DougGregor requested a review from a team as a code owner May 28, 2021 21:52
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 958b873

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 958b873

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@DougGregor DougGregor merged commit 30e7b5c into swiftlang:release/5.5-05142021 Jun 2, 2021
@DougGregor DougGregor deleted the minimal-stdlib-concurrency-fix-5.5-05142021 branch June 2, 2021 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants