diff --git a/Sources/Testing/Support/Locked+Platform.swift b/Sources/Testing/Support/Locked+Platform.swift index 2b3f5b648..951e62da8 100644 --- a/Sources/Testing/Support/Locked+Platform.swift +++ b/Sources/Testing/Support/Locked+Platform.swift @@ -94,14 +94,3 @@ typealias DefaultLock = Never #warning("Platform-specific implementation missing: locking unavailable") typealias DefaultLock = Never #endif - -#if SWT_NO_DYNAMIC_LINKING -/// A function which, when called by another file, ensures that the file in -/// which ``DefaultLock`` is declared is linked. -/// -/// When static linking is used, the linker may opt to strip some or all of the -/// symbols (including protocol conformance metadata) declared in this file. -/// ``LockedWith`` calls this function in ``LockedWith/init(rawValue:)`` to work -/// around that issue. -func linkLockImplementations() {} -#endif diff --git a/Sources/Testing/Support/Locked.swift b/Sources/Testing/Support/Locked.swift index c69cfd351..e8b17be7b 100644 --- a/Sources/Testing/Support/Locked.swift +++ b/Sources/Testing/Support/Locked.swift @@ -66,10 +66,6 @@ struct LockedWith: RawRepresentable where L: Lockable { private nonisolated(unsafe) var _storage: ManagedBuffer init(rawValue: T) { -#if SWT_NO_DYNAMIC_LINKING - linkLockImplementations() -#endif - _storage = _Storage.create(minimumCapacity: 1, makingHeaderWith: { _ in rawValue }) _storage.withUnsafeMutablePointerToElements { lock in L.initializeLock(at: lock)