Describe the bug
Clang provides some C headers as polyfills (or shims) and the Swift toolchain vendors it in /usr/lib/clang/{clang_version}/include. However, the Swift compiler doesn’t recognize these headers, so a module produced by the bundled Clang may not be consumed by Swift.
Steps To Reproduce
Steps to reproduce the behavior:
- Clone
https://github.com/apple/swift-atomics;
- Change directory to
swift-atomics;
- Run
swift build.
Expected behavior
Since the _AtomicsShims target is successfully compiled, it should be consumable for Atomics.
Screenshots

Environment
- OS: Windows Server 2019 Datacenter (1809)
- Swift version: 5.6.2
- Visual Studio: Community 2019, 16.11.18
Additional context
Although this can be worked around from the SwiftPM side, I believe resolving it with swiftc is a better choice.
Describe the bug
Clang provides some C headers as polyfills (or shims) and the Swift toolchain vendors it in
/usr/lib/clang/{clang_version}/include. However, the Swift compiler doesn’t recognize these headers, so a module produced by the bundled Clang may not be consumed by Swift.Steps To Reproduce
Steps to reproduce the behavior:
https://github.com/apple/swift-atomics;swift-atomics;swift build.Expected behavior
Since the
_AtomicsShimstarget is successfully compiled, it should be consumable forAtomics.Screenshots

Environment
Additional context
Although this can be worked around from the SwiftPM side, I believe resolving it with
swiftcis a better choice.