Skip to content

Headers: exclude #include_next <stdatomic.h> on MSVC #3578

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
Nov 29, 2021

Conversation

compnerd
Copy link
Member

The 14.31.30818 toolset has the following in the stdatomic.h:

 #ifndef __cplusplus
 #error <stdatomic.h> is not yet supported when compiling as C, but this is planned for a future release.
 #endif

This results in clang failing to build existing code which relied on
stdatomic.h in C mode on Windows. Simply fallback to the clang header
until that header is available as a complete implementation.

(cherry picked from commit 1ad7de9)

The 14.31.30818 toolset has the following in the `stdatomic.h`:
~~~
 #ifndef __cplusplus
 #error <stdatomic.h> is not yet supported when compiling as C, but this is planned for a future release.
 #endif
~~~

This results in clang failing to build existing code which relied on
`stdatomic.h` in C mode on Windows.  Simply fallback to the clang header
until that header is available as a complete implementation.

(cherry picked from commit 1ad7de9)
@compnerd
Copy link
Member Author

CC: @etcwilde @bnbarham @ahoppen

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@bnbarham - if the new rebranch point has already been created, we should pull this into that as well - this was committed upstream a few days ago.

@compnerd compnerd merged commit 6d39825 into swiftlang:stable/20210726 Nov 29, 2021
@compnerd compnerd deleted the atomics-msvc branch November 29, 2021 18:17
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