Skip to content

[stdlib] Condition Mutex.swift on platform #74143

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 2 commits into from
Jun 6, 2024

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Jun 5, 2024

Mutex.swift was previously never conditional and always built, but the handle was conditioned based on platform. In a minimal toolchain, we don't have a platform to piggyback on, so we shouldn't build Mutex.swift either.

Resolves: rdar://129287049

@Azoy Azoy requested a review from glessard June 5, 2024 16:22
@Azoy Azoy requested a review from a team as a code owner June 5, 2024 16:22
@Azoy
Copy link
Contributor Author

Azoy commented Jun 5, 2024

@swift-ci please smoke test

@Azoy
Copy link
Contributor Author

Azoy commented Jun 5, 2024

preset=stdlib_S_standalone_minimal_macho_x86_64,build,test
@swift-ci please test with preset

@Azoy
Copy link
Contributor Author

Azoy commented Jun 5, 2024

preset=stdlib_S_standalone_minimal_macho_x86_64,build,test
@swift-ci please test with toolchain and preset

@stephentyrone
Copy link
Contributor

stephentyrone commented Jun 5, 2024

Are we going to end up having to be able to check for availability? Should we put an unavailable placeholder in to give people a better error on other platforms? Also, do we need this on 6.0?

@Azoy Azoy changed the title [stdlib] Conditionalize Mutex.swift on platform [stdlib] Condition Mutex.swift on platform Jun 5, 2024
@Azoy
Copy link
Contributor Author

Azoy commented Jun 5, 2024

It seems like we should be able to have an unavailable availability for Mutex on platforms that don't support it (we can compile a special version of Mutex on those platforms). Yes we do, I'm going to put up a PR with this and the Mutex changes to 6.0

@Azoy
Copy link
Contributor Author

Azoy commented Jun 5, 2024

@swift-ci please smoke test

@Azoy
Copy link
Contributor Author

Azoy commented Jun 5, 2024

preset=stdlib_S_standalone_minimal_macho_x86_64,build,test
@swift-ci please test with toolchain and preset

@Azoy Azoy merged commit 4f8181d into swiftlang:main Jun 6, 2024
3 checks passed
@Azoy Azoy deleted the mutex-minimal-thing branch June 6, 2024 14:54
Azoy added a commit to Azoy/swift that referenced this pull request Jun 6, 2024
[stdlib] Condition Mutex.swift on platform
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.

2 participants