Skip to content

Commit a2ea8fc

Browse files
authored
Merge pull request #1050 from swiftlang/jgrynspan/revert-1035
Revert "Ensure `Locked+Platform.swift` is not stripped when statically linking. (#1035)"
2 parents f770543 + e37b6f9 commit a2ea8fc

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

Sources/Testing/Support/Locked+Platform.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,3 @@ typealias DefaultLock = Never
9494
#warning("Platform-specific implementation missing: locking unavailable")
9595
typealias DefaultLock = Never
9696
#endif
97-
98-
#if SWT_NO_DYNAMIC_LINKING
99-
/// A function which, when called by another file, ensures that the file in
100-
/// which ``DefaultLock`` is declared is linked.
101-
///
102-
/// When static linking is used, the linker may opt to strip some or all of the
103-
/// symbols (including protocol conformance metadata) declared in this file.
104-
/// ``LockedWith`` calls this function in ``LockedWith/init(rawValue:)`` to work
105-
/// around that issue.
106-
func linkLockImplementations() {}
107-
#endif

Sources/Testing/Support/Locked.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ struct LockedWith<L, T>: RawRepresentable where L: Lockable {
6666
private nonisolated(unsafe) var _storage: ManagedBuffer<T, L>
6767

6868
init(rawValue: T) {
69-
#if SWT_NO_DYNAMIC_LINKING
70-
linkLockImplementations()
71-
#endif
72-
7369
_storage = _Storage.create(minimumCapacity: 1, makingHeaderWith: { _ in rawValue })
7470
_storage.withUnsafeMutablePointerToElements { lock in
7571
L.initializeLock(at: lock)

0 commit comments

Comments
 (0)