Skip to content
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 support for using LLVM intrinsics instead of C atomics #74

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Mar 20, 2023

This adds a special build variant where C atomics are replaced with LLVM intrinsics.

This is not going to be enabled by default, because the use of -parse-stdlib is currently verboten for Swift packages.

However, it is an important step forward: once swiftlang/swift#56105 gets fixed, and we figure out how to allow the use of builtins from Swift packages, then this package could do away with defining a C module altogether.

Checklist

  • I've read the Contribution Guidelines
  • My contributions are licensed under the Swift license.
  • I've followed the coding style of the rest of the project.
  • I've added tests covering all new code paths my change adds to the project (if appropriate).
  • I've verified that my change does not break any existing tests.
  • I've updated the documentation if necessary.

@lorentey lorentey requested a review from glessard March 20, 2023 18:56
@lorentey
Copy link
Member Author

Cc @glessard

@lorentey
Copy link
Member Author

@swift-ci test

@lorentey lorentey marked this pull request as ready for review March 24, 2023 22:34
@lorentey lorentey changed the title Replace the use of C atomics with LLVM intrinsics Add support for using LLVM intrinsics instead of C atomics Mar 24, 2023
@lorentey lorentey merged commit ce1f045 into apple:main Mar 24, 2023
@lorentey lorentey added this to the 1.1.0 milestone Mar 24, 2023
@lorentey lorentey deleted the native-builtins branch March 25, 2023 02:11
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.

1 participant