Commit Graph
210 Commits
Author SHA1 Message Date
Nate Cook 9ea086d683 More fixes 2025-03-06 09:11:37 -06:00
Nate Cook b6bc543abb ... 2025-03-05 18:11:04 -06:00
Nate Cook c384117b20 First pass at formatting changes 2025-03-05 11:40:55 -06: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
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
Karoy Lorentey b1b74cb512 Reorganize source folder 2023-09-20 18:39:37 -07:00
Karoy Lorentey c39a7eff8d De-gyb HighLevelTypes.swift and AtomicLazyReference.swift 2023-09-20 18:34:02 -07:00
Karoy Lorentey 1f6a86f726 Start using _pointerBitWidth in 5.9+ 2023-09-18 16:08:16 -07:00
Karoy Lorentey d75ef1b060 [NFC] Move protocol AtomicStorage into its own source file 2023-09-18 16:05:17 -07:00
Konrad `ktoso` Malawski b47c8b1a6d Merge pull request #100 from apple/wip-avoid-symlinks 2023-09-14 14:29:53 +09:00
Konrad `ktoso` Malawski b6c32c13cd Avoid using symlinks for package files
Resolves https://github.com/apple/swift-atomics/issues/98
2023-09-14 13:24:56 +09:00
Karoy Lorentey 38a8ccdf78 Merge pull request #97 from lorentey/autolink-libswiftCore
[_AtomicShims] On Darwin, ensure we link against libswiftCore using assembly shenanigans
2023-08-14 17:00:39 -07:00
Karoy Lorentey 5603f612d2 [_AtomicShims] Don’t try to extend the library path using .linker_option
This emits a warning and it seems to be unnecessary.
2023-08-14 15:58:00 -07:00
Karoy Lorentey 673864b809 [_AtomicShims] On Darwin, ensure we link against libswiftCore using assembly shenanigans
This avoids 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.
2023-08-11 15:39:22 -07:00
Karoy Lorentey 2ff28f8732 Merge pull request #93 from lorentey/fix-old-manifests
Fix version-specific manifest for 5.6..<5.9
2023-07-18 17:43:22 -07:00
Karoy Lorentey 5f7709d5d0 Fix version-specific manifest for 5.6..<5.9 2023-07-18 14:57:15 -07:00