Skip to content

[cmake] add SINGLE_THREADED_MODE option to Synchronization #81980

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
Jun 4, 2025

Conversation

justice-adams-apple
Copy link
Contributor

Add SwiftSynchronization_FORCE_EMPTY_MUTEX_IMPLEMENTATION flag to use empty mutex definition for certain apple platforms. This brings Synchronization in line with the current build systems functionality

We will revisit this in the future to determine if we can add a mutex definition for all Darwin platforms

@justice-adams-apple
Copy link
Contributor Author

@swift-ci smoke test

@@ -58,6 +58,8 @@ option(${PROJECT_NAME}_ENABLE_LIBRARY_EVOLUTION "Generate ABI resilient runtime
option(${PROJECT_NAME}_ENABLE_PRESPECIALIZATION "Enable generic metadata prespecialization"
${SwiftCore_ENABLE_PRESPECIALIZATION})

option(${PROJECT_NAME}_FORCE_EMPTY_MUTEX_IMPLEMENTATION "Force use an empty mutex implementation" OFF)
Copy link
Member

Choose a reason for hiding this comment

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

Why _FORCE? Why not call this Synchronization_SINGLE_THREADED_MODE?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@compnerd renamed the variable

@justice-adams-apple justice-adams-apple force-pushed the jadams/force-empty-mutex branch from 6bcd886 to 5dd300d Compare June 4, 2025 18:11
@justice-adams-apple
Copy link
Contributor Author

@swift-ci smoke test

@justice-adams-apple justice-adams-apple changed the title [cmake] add FORCE_EMPTY_MUTEX_IMPLEMENTATION option to Synchronization [cmake] add SINGLE_THREADED_MODE option to Synchronization Jun 4, 2025
@justice-adams-apple justice-adams-apple merged commit ecad1d9 into main Jun 4, 2025
3 checks passed
@justice-adams-apple justice-adams-apple deleted the jadams/force-empty-mutex branch June 4, 2025 23:33
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