Skip to content

Commit f26da16

Browse files
committed
On 5.9, hide the _AtomicsShims import from the public interface
This appears to resolve a build failure when library evolution is enabled. (This isn’t a fully supported configuration (this package is not ABI stable), but it should still be possible to build the package in that configuration.) @_implementationOnly has bad failure modes when library evolution isn’t enabled, but I hope we’ll be avoiding those here, as on 5.9+, we’re only using it to import a couple of functions — we aren’t relying on imported things to set struct layouts or anything like that. 🤞
1 parent fe0fc8b commit f26da16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Atomics/Unmanaged extensions.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ internal func _sa_retain_n(_ object: UnsafeMutableRawPointer, _ delta: UInt32)
1616

1717
@_silgen_name("_sa_release_n")
1818
internal func _sa_release_n(_ object: UnsafeMutableRawPointer, _ delta: UInt32)
19+
#elseif ATOMICS_NATIVE_BUILTINS
20+
@_implementationOnly import _AtomicsShims
1921
#else
2022
import _AtomicsShims
2123
#endif

0 commit comments

Comments
 (0)