88 Commits
Author SHA1 Message Date
Karoy Lorentey ff3d2212b6 Merge pull request #60 from lorentey/add-doc-bundle
Add a DocC bundle for the Atomics module
1.0.3
2022-12-08 17:44:03 -08:00
Karoy Lorentey 3366a367c5 Add a configuration file for the Swift Package Index 2022-12-08 17:26:23 -08:00
Karoy Lorentey a2271697ad [manifest] Add 5.5 manifest for the new docc bundle; exclude it from 5.3 manifest 2022-12-08 16:06:59 -08:00
Karoy Lorentey 6c8237adbd [AtomicValue] Document AtomicRepresentation 2022-12-08 16:06:15 -08:00
Karoy Lorentey 22b3e539a5 [docs] Add a documentation bundle 2022-12-08 16:05:53 -08:00
Karoy Lorentey 088df27f06 Merge pull request #52 from michaelknoch/patch-1
fix cmake build when Atomics is built as dependency
2022-04-06 12:46:02 -07:00
Michael Knoch 681881b668 fix CMAKE_MODULE_PATH 2022-03-24 14:59:53 +01:00
Karoy Lorentey 5258787774 Merge pull request #50 from karwa/fenced-in
[Documentation] Add a note that TSan does not support fences.
2022-02-04 17:28:42 -08:00
Karl f62b0d33b4 [Documentation] Add a note that TSan does not support fences. 2021-11-12 12:42:37 +01:00
Karoy Lorentey ca13c9bd7b Merge pull request #49 from chornge/readme-autogenerated-subdirectories
Update README for autogenerated subdirectories
2021-10-27 18:08:11 -07:00
Christian Mbaba ca87c443e8 Update README for autogenerated subdirectories
• "You must never..." implies a prohibition where doing the opposite would lead to an undesired or unpredictable outcome. That isn't the case here since the changes made to `autogenerated` subdirectories get overwritten on code regeneration. Also, there's no indication that changes could/would affect SPM builds (which would justify the prohibition).

• "You should not..." implies more of a recommendation than a prohibition since it is wasted effort because all changes will be overwritten in order for the package to remain buildable.
2021-10-23 07:15:43 -05:00
Karoy Lorentey 919eb1d83e Merge pull request #48 from lorentey/fix-UnsafeAtomic-Sendable
Fix `UnsafeAtomic`'s `Sendable` conformance
1.0.2
2021-09-24 16:35:28 -07:00
Karoy Lorentey 44bf6b59dc Fix UnsafeAtomic's Sendable conformance
In Swift 5.5, `UnsafeAtomic` has gained an implicit, unconditional `Sendable` conformance, because it is a `@frozen public struct` whose sole stored property (an `UnsafeMutablePointer` is also `Sendable`. This is not correct -- we only want `UnsafeAtomic` to conform to `Sendable` if its `Value` does.

Explicitly declare the conformance on 5.5 to disable the bogus inference.
2021-09-24 14:51:07 -07:00
Karoy Lorentey de1a62250e Merge pull request #44 from apple/script-updates
Update utility scripts
2021-09-23 15:10:14 -07:00
Karoy Lorentey 2e0f2aa421 SWIFT_ATOMIC_LONG_TEST → SWIFT_ATOMICS_LONG_TESTS 2021-09-23 11:51:32 -07:00
Karoy Lorentey 1d52cd901f [Utilities] Remove leftovers of a failed attempt at copy & paste 2021-09-23 11:49:51 -07:00
Karoy Lorentey e327051acf [Utilities] run-full-tests.sh: Also run long tests and TSan tests. Split up xcodebuild destinations 2021-09-22 22:12:19 -07:00
Karoy Lorentey d7b6750c6e [test] Scale down tests by default 2021-09-22 22:11:31 -07:00
Karoly Lorentey 7eb7c1485c [Utilities] generate-sources → generate-sources.sh 2021-09-22 19:37:07 -07:00
Karoly Lorentey c8910fbee9 [Utilities] Update run-full-tests.sh
Build the package with all the configurations before running any tests. This speeds up obvious failures.
2021-09-22 19:25:08 -07:00
Karoly Lorentey fef04c75ae [Utilities] Upgrade gyb to Python 3 2021-09-22 19:25:08 -07:00
Karoly Lorentey 6edab31515 [Utilities] Move generate-sources under Utilities/ 2021-09-22 19:24:50 -07:00
Karoy Lorentey f3bead1aba Merge pull request #39 from lorentey/tweak-cmake
[cmake] Fix building with CMake
2021-09-22 19:02:47 -07:00
Karoy Lorentey 0e10d28288 Fix arm64 CMake configuration 2021-09-22 14:53:32 -07:00
Karoy Lorentey 0e51be5d3a Unmanaged.retain(by:)/release(by:): Remove @inlinable
These are only ever called from opaque function bodies, so there is no need to make them inlinable anyway.

This allows us to stop linking client code with _AtomicsShims. (Although I don't quite understand how it was necessary before.)
2021-09-22 14:53:32 -07:00
Karoy Lorentey 98a31b396d [cmake] Fix building with CMake
- Disable building tests on Darwin
- Fix test registration on Linux when double-wide atomics aren't available
- Unconditionally enable double-wide atomics
2021-09-22 14:53:32 -07:00
Karoy Lorentey 621eebb2ac Merge pull request #43 from lorentey/fix-doublewide-load-issue
Implement double-wide loads with compare-exchange on arm64 in debug builds with the Swift 5.5 compiler
2021-09-22 14:44:45 -07:00
Karoy Lorentey 2468fa3eac Also use compare-exchange in dispose() 2021-09-22 13:33:39 -07:00
Karoy Lorentey e08ad97132 Implement double-wide loads with compare-exchange on arm64 in debug builds with the Swift 5.5 commpiler
Resolves https://github.com/apple/swift-atomics/issues/41.
2021-09-22 13:06:19 -07:00
Karoy Lorentey 2eb6b8d3ce Merge pull request #40 from lorentey/add-test-script
Add support test script
2021-09-14 12:07:27 -07:00
Karoy Lorentey 8e5d52727e Add support test script
This semi-automated test script exercises some build configurations that aren't covered by regular CI runs.
2021-09-10 20:15:26 -07:00
Karoy Lorentey 5b282079cb Merge pull request #38 from lorentey/ifdef-away-the-problem
[shims] Only define atomic shims in Swift's Clang Importer
2021-09-09 11:47:35 -07:00
Karoy Lorentey 5d07eab6fe [shims] Only define atomic shims in Swift's Clang Importer
Per #37, we currently happen to use some non-standard C atomics that only work in Clang; to prevent issues when this module gets compiled using other compilers, `#ifdef` out all the actual shims, leaving only the definitions for `retain_n`/`release_n`.

(For example, CMake builds the shims module using the system C compiler by default, which is usually GCC on Linux.)
2021-09-08 18:11:06 -07:00
Karoy Lorentey 59f7fbf479 Merge pull request #36 from apple/unsupported-library-evolution-fixes
Fix build errors with library evolution enabled
1.0.1
2021-08-30 14:16:24 -07:00
Karoy Lorentey 8dbc766252 Merge pull request #34 from lorentey/shims-64ism
[shims] Fix i386/armv7 regression introduced in #26
2021-08-30 14:16:08 -07:00
Karoy Lorentey 9038994d06 Merge pull request #35 from lorentey/fix-manifest-warnings
[manifest] Fix warnings in 5.3 toolchains
2021-08-30 13:09:14 -07:00
Karoy Lorentey 1d4afa40d7 Fix build errors with library evolution enabled
We do not support building this package with `-enable-library-evolution`, but I don't see a reason not to fix build errors with that configuration.
2021-08-30 12:54:20 -07:00
Karoy Lorentey b58a624375 [manifest] Fix warnings in 5.3 toolchains 2021-08-30 12:32:25 -07:00
Karoy Lorentey d4a3aae83b [shims] Fix i386/armv7 regression introduced in #26 2021-08-30 12:28:45 -07:00
Karoy Lorentey 46a6952359 Merge pull request #32 from lorentey/prepping-for-1.0
[NFC] Update copyright notices
1.0.0
2021-08-27 18:33:04 -07:00
Karoy Lorentey 38049a4a30 Clarify source stability 2021-08-27 17:31:52 -07:00
Karoy Lorentey 299d1251f1 Regenerate gybbed sources 2021-08-27 17:19:56 -07:00
Karoy Lorentey eb7e1335f8 [NFC] Update copyright notices 2021-08-27 17:13:03 -07:00
Karoy Lorentey 02183c16b9 Merge pull request #31 from lorentey/prepping-for-1.0
Declare Atomics source stable and describe what we consider public API
2021-08-27 15:11:56 -07:00
Karoy Lorentey d8a2baf4d5 Add PR and issue templates 2021-08-27 12:44:21 -07:00
Karoy Lorentey 83ae389117 Declare Atomics source stable and describe what we consider public API 2021-08-27 12:28:55 -07:00
Karoy Lorentey 2c8a002c6b Merge pull request #30 from lorentey/prepping-for-1.0
Bump required toolchain version to 5.3
2021-08-27 12:26:44 -07:00
Karoy Lorentey f659ecc1bb Bump required toolchain version to 5.3
Resolves issue #22.
2021-08-27 11:34:41 -07:00
Karoy Lorentey 9ded028e0d Merge pull request #25 from compnerd/cmake
build: add a CMake based build for Atomics
2021-08-18 19:04:26 -07:00
Saleem Abdulrasool 907a24f5f2 Add the ability to run tests via CMake
This adds the ability to run the test suite via CMake + Ninja.
2021-04-30 09:13:39 -07:00