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
Saleem Abdulrasool
67bbf646d8
build: add a CMake based build for Atomics
...
This adds an initial implementation of a CMake based build system.
2021-04-30 08:32:45 -07:00
Karoy Lorentey
3f940c4519
Merge pull request #29 from compnerd/xctest-manifest
...
Tests: add XCTest manifest for non-SPM based builds
2021-04-29 19:47:48 -07:00
Karoy Lorentey
f8d5956ff9
Merge pull request #28 from compnerd/swap
...
gitignore: ignore vim swap files
2021-04-29 18:33:33 -07:00
Saleem Abdulrasool
c711547ac1
Tests: add XCTest manifest for non-SPM based builds
...
This allows for testing without SPM on non-Darwin targets. We
explicitly exclude the manifest in SPM based builds because we would
like to use the automatic test discovery functionality from SPM.
2021-04-29 14:43:21 -07:00
Saleem Abdulrasool
a2e04c3c60
gitignore: ignore vim swap files
2021-04-29 14:42:54 -07:00
Karoy Lorentey
c9ab2e4cb0
Merge pull request #26 from compnerd/dword
...
_AtomicShims: simplify double word setup
2021-04-26 18:28:03 -07:00
Saleem Abdulrasool
7294d12edd
_AtomicShims: simplify double word setup
...
Unify the double word path by using a bit more macro expansion. The two
differences between 32-bit and 64-bit is:
- `__uint128_t` vs `uint64_t`
- 64-bit shifts vs 32-bit shifts
We can simply use a macro to expand out the underlying C type rather
than bifurcating the definitions. For the second difference, we can
simply use the `__INTPTR_WIDTH__` for the shifts. We explicitly use
macros for the type-definitions to hide the typedef from Swift.
Use the C11 aggregate constructor to further reduce the code.
2021-04-23 08:24:29 -07:00
Karoy Lorentey
a27aa0d6d1
Merge pull request #24 from dfunckt/main
...
Mark the additional Bool methods as public
2021-04-21 23:18:30 -07:00
Akis Kesoglou
7e101a5653
Mark the additional Bool methods as public
...
…inline with the static methods on AtomicStorage and AtomicIntegerStorage.
2021-03-14 19:20:38 +02:00
Karoy Lorentey
3e95ba32cd
Merge pull request #20 from lorentey/watchOS-warning-fix
...
DoubleWord._readersBitWidth: Switch to using Int.bitWidth
0.0.3
2021-01-27 13:32:19 -08:00
Karoy Lorentey
09ddcdd88d
DoubleWord._readersBitWidth: Switch to using Int.bitWidth
...
This fixes a spurious warning about `arch(arm64_32)` emitted by swift.org compiler builds.
Resolves #19
2021-01-26 17:38:10 -08:00
Karoy Lorentey
df9f811f19
[shims] Remove unnecessary #include
2020-11-18 16:41:58 -08:00
Karoy Lorentey
6535403113
Merge pull request #17 from lorentey/support-5.2
...
Work around some compiler issues in Swift 5.2
2020-11-13 18:32:42 -08:00
Karoy Lorentey
47c88d732f
Work around some compiler issues in Swift 5.2
...
This allows the package to be built with the Swift 5.2.4 toolchain.
Resolves #15
2020-11-09 13:52:03 -08:00
Karoy Lorentey
ccce007d5d
Merge pull request #14 from jpsim/patch-1
...
Fix typo in AtomicMemoryOrderings.swift docstring
2020-10-22 12:43:38 -07:00
JP Simard
55a062c4a8
Fix typo in AtomicMemoryOrderings.swift docstring
2020-10-22 06:03:22 -07:00
Karoy Lorentey
26e346cd64
Merge pull request #12 from lorentey/restore-linux-support
...
Fix Linux compatibility
0.0.2
2020-10-12 12:26:59 -07:00
Karoy Lorentey
7658766e61
Remove LinuxMain.swift
...
This package requires --enable-test-discovery.
2020-10-12 12:08:04 -07:00
Karoy Lorentey
230c1aa676
Add note on portability of double-wide atomics
2020-10-09 17:18:19 -07:00
Karoy Lorentey
ed324ec42e
generate-sources: Don’t invoke —generate-linuxmain
...
SPM’s --generate-linuxmain feature doesn’t support conditionally compiled tests.
To run tests on non-Darwin platforms, use `swift test --enable-test-discovery`.
2020-10-09 14:53:02 -07:00