221 Commits
Author SHA1 Message Date
Karoy Lorentey b601256eab Merge pull request #120 from lorentey/update-xcodeproj
Update Xcode project
1.3.0
2025-06-04 12:56:01 -07:00
Karoy Lorentey ee599def1a Update Xcode project 2025-06-04 12:50:47 -07:00
Karoy Lorentey 490b14e219 Merge pull request #119 from lorentey/update-supported-toolchains
Bump required toolchain to Swift 5.10
2025-06-04 12:40:28 -07:00
Karoy Lorentey 040c295e86 Update copyrights 2025-06-04 11:31:02 -07:00
Karoy Lorentey 228f980b04 Update GitHub pull request workflow
Stop trying to test with Swift 5.9 on Linux
2025-06-03 19:26:59 -07:00
Karoy Lorentey cae5c18207 [test] Confess that Unmanaged’s hacky Equatable conformance is retroactive 2025-06-03 19:23:56 -07:00
Karoy Lorentey 581fb9e875 Drop support for Swifts 5.7-5.9
As usual, we support just the three latest Swift releases: 5.10, 6.0 and 6.1.

Also delete obsolete C atomics. Dropping Swifts <5.9 allows us to make ATOMICS_NATIVE_BUILTINS the unconditional default behavior.
2025-06-03 19:23:53 -07:00
Karoy Lorentey 239a74d140 Merge pull request #117 from rgoldberg/116-executable-markdown
Remove executable bit from 2 Markdown files
2025-06-03 18:25:27 -07:00
Karoy Lorentey bbabc0eb17 Merge pull request #114 from wanbok/patch-1
Update README.md
2025-06-03 18:05:00 -07:00
Karoy Lorentey ae09acf534 Merge pull request #118 from apple/egorzhdan/extern-c
Make AtomicsShims compatible with C++ interop
2025-06-03 18:03:09 -07:00
Egor Zhdan 14b0f18370 Make AtomicsShims compatible with C++ interop
This fixes linker errors such as
```
Undefined symbols for architecture arm64:
  "_sa_retain_n(void*, unsigned int)", referenced from:
      (extension in Atomics):Swift.Unmanaged.retain(by: Swift.Int) -> () in Unmanaged extensions.swift.o
   NOTE: found '__sa_retain_n' in _AtomicsShims.c.o, declaration possibly missing 'extern "C"'
```
when building with Swift/C++ interoperability enabled.
2025-05-30 16:43:33 +01:00
Ross Goldberg c2a3bed658 Remove executable bit from 2 Markdown files.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
2025-05-11 05:07:32 -04:00
Mishal Shah d61ca105d6 Merge pull request #115 from apple/github-actions-support
[CI] Add support for GitHub Actions
2025-03-07 16:22:48 -08:00
Nate Cook 4bd141c54f Disable failing checks 2025-03-05 11:19:36 -06:00
Mishal Shah 81d30f50be Update the swift-evolution urls 2025-03-04 23:35:49 -08:00
Mishal Shah aaed6134e1 [CI] Add support for GitHub Actions 2025-03-04 23:15:02 -08:00
Wanbok Choi (Wayne) 14e0302666 Update README.md
Remove the 'Portability Concerns' link
2025-03-01 19:38:16 +09:00
Karoy Lorentey 9e65972363 Merge pull request #113 from futurejones/add-riscv64-support
add support for riscv64
2024-07-18 17:46:37 -07:00
Neil Jones d0e0a4ad9d add support for riscv64 2024-06-17 12:21:32 +09:00
Karoy Lorentey 1f2007ef41 Merge pull request #110 from lorentey/there-is-no-such-thing-as-an-implementation-only-import
[native] Stop using @_implementationOnly import in package configs
2023-12-14 19:34:47 -05:00
Karoy LorenteyandGuillaume Lessard 074c8c8fea Update link to compiler issue
Co-authored-by: Guillaume Lessard <glessard@users.noreply.github.com>
2023-12-13 15:04:52 -08:00
Karoy Lorentey a3ac36c96d [native] Stop using @_implementationOnly import in package configs
@_implementationOnly does not work correctly unless Swift’s Library Evolution dialect is enabled — it leads to obscure module loading failures.

There seems to be no way to create a compile-time condition on whether library evolution is enabled, so we need to stop using @_implementationOnly imports in all package configurations.
2023-12-12 12:05:41 -08:00
Karoy Lorentey ddacb0864c Merge pull request #109 from lorentey/fix-swiftcc-mismatch
_sa_retain_n/_sa_release_n: Use C calling convention in package builds
2023-12-12 14:42:20 -05:00
Karoy Lorentey bd8115e046 _sa_retain_n/_sa_release_n: Use C calling convention in package builds 2023-12-07 11:14:18 -08:00
Karoy Lorentey cd142fd2f6 Merge pull request #106 from lorentey/release-cleanup
Not so minor prerelease fixups/changes
1.2.0
2023-09-27 18:26:29 -07:00
Karoy Lorentey 3431b8543f Fix CMake configuration 2023-09-27 16:12:25 -07:00
Karoy Lorentey 02d0d97948 [Xcode] Formally update .xcodeproj to Xcode 15
Also, remove an orphaned package manifest link.
2023-09-27 15:26:46 -07:00
Karoy Lorentey 084814f56f [Xcode] Move code sign config to shared xcconfig
This makes these settings automatically apply to the test target, too.
2023-09-27 15:01:41 -07:00
Karoy Lorentey f26da16e6e 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. 🤞
2023-09-27 14:46:50 -07:00
Karoy Lorentey fe0fc8b76c Avoid confusing Swift 5.7 with _pointerBitWidth conditionals
#if conditional parsing is evidently broken in 5.7, and it gets confused unless things are arranged just right. Things seem to work as long as the `compiler(>=5.9)` conditional is put on its own `#if` construct on the topmost level — so let’s do that for now.
2023-09-27 14:19:36 -07:00
Karoy Lorentey 48fad5a291 Let builtins & shims expose different primitive signatures
For builtins, we want to emulate the stdlib’s solution where all atomic primitive operations take and return a (sort of) opaque atomic representation value.

For C shims, we do not want to atomic primitives to take and return _Atomic(T) values, so let’s revert to the original 1.1.x solution.
2023-09-25 21:05:53 -07:00
Karoy Lorentey d976dd29ad Protect _pointerBitWidth conditionals from misparsing on older Swifts 2023-09-25 19:42:22 -07:00
Karoy Lorentey 8189a83f1c [DocC] Fix some missing items 2023-09-22 17:04:54 -07:00
Karoy Lorentey 1abcb9584a [test] Don’t report failures when weakCompareExchange to spuriously fails 2023-09-22 16:51:43 -07:00
Karoy Lorentey 5b1941e84e Update README 2023-09-22 16:48:37 -07:00
Karoy Lorentey 4a34c7a38f [Xcode] Add “iOS Developer” as code sign identity for iOS/watchOS/tvOS 2023-09-22 16:11:20 -07:00
Karoy Lorentey de979cde5c [Utilities/run-full-tests.sh] Fix label of tvOS Xcodeproj build 2023-09-22 16:10:46 -07:00
Karoy Lorentey d8a523950d Merge pull request #103 from lorentey/drop-swift-5.6
Drop support for Swift 5.6
2023-09-22 11:27:02 -07:00
Karoy Lorentey 8650506425 Merge pull request #105 from lorentey/update-cmake
[CMake] Do not list .gyb files as sources
2023-09-22 11:26:32 -07:00
Karoy Lorentey 6ed54fa0d3 [CMake] Do not list .gyb files as sources 2023-09-22 11:24:11 -07:00
Karoy Lorentey 8be2ba9c43 Drop support for Swift 5.6
Clients who cannot upgrade their toolchain yet will continue to work with Swift Atomics 1.1.

List of currently supported Swift releases:

- Swift 5.9 release series
- Swift 5.8 release series
- Swift 5.7 release series

We also aim to support building and using swift-atomics on developer snapshots of Swift’s active branches (release/5.10 and main).
2023-09-22 11:17:05 -07:00
Karoy Lorentey 8e18576d70 Merge pull request #102 from lorentey/fix-alignment-issues
Fix alignment issues with double-wide atomics on i386
2023-09-22 11:16:16 -07:00
Karoy Lorentey f10f0313d2 Add back-compat manifests to Xcode/Atomics.xcodeproj 2023-09-22 00:46:04 -07:00
Karoy Lorentey a9219a8df8 Avoid accidentally enabling C shims within the test target 2023-09-22 00:46:02 -07:00
Karoy Lorentey 8dd81aef5c Update exclusion lists in package manifests 2023-09-22 00:42:25 -07:00
Karoy Lorentey 8b703fe93c [native atomics] Fix alignment issues by reintroducing custom storage types
The SysV ABI defined uint64_t with 4 byte alignment on i386 — so we can’t just assume that the integer types will have the right alignment by default for atomics.

Emulate the original `_Atomic<Width>Storage` types in the C shims even in native atomics configuration, so that they can carry a custom `@_alignment` attribute.
2023-09-22 00:41:51 -07:00
Karoy Lorentey bb83f8487b Merge pull request #101 from lorentey/reorg
Reorganize sources for future work
2023-09-21 17:35:09 -07:00
Karoy Lorentey 9351ce080d DoubleWord.AtomicRepresentation: Use DoubleWord storage on all platforms
We used to use Int64 on 32-bit architectures, but the inconsistency is bothering me. (Even ignoring alignment issues on SysV-derived ABIs on i386.)
2023-09-20 19:27:45 -07:00
Karoy Lorentey 9db6c56d8d Update CMake and Xcode build configs 2023-09-20 19:08:41 -07:00
Karoy Lorentey 4166cff711 Move definition of DoubleWord into DoubleWord.swift 2023-09-20 18:49:02 -07:00