apple / swift-atomics

Low-level atomic operations for Swift
Apache License 2.0
1.06k stars 50 forks source link

[_AtomicShims] On Darwin, ensure we link against libswiftCore using assembly shenanigans #97

Closed lorentey closed 1 year ago

lorentey commented 1 year ago

Like #95 and #96, the intention here is to avoid a linker failure when the build system decides to build this module as a standalone library.

Hopefully this will all go away soon, when swift_retain_n/swift_release_n will become primitives exposed by the stdlib.

Resolves #55

Checklist

lorentey commented 1 year ago

@swift-ci test

lorentey commented 1 year ago

Local testing confirms that this resolves the issue that's plaguing #55 (and rdar://108390931).

lorentey commented 1 year ago

Local testing confirms that this resolves the issue that's plaguing https://github.com/apple/swift-atomics/issues/55 (and rdar://108390931).

Not so fast! It looks like the method I'm using to override the swift-atomics release tag with a local checkout also resolves it, by itself. Grr.

lorentey commented 1 year ago

@swift-ci test

rvsrvs commented 1 year ago

@lorentey does Swift 5.9 expose swift_retain_n and swift_release_n? Thinking this would fix all my problems with playgrounds!