Skip to content

Commit d001831

Browse files
committed
Shims: strongly link swift_isStackAllocationSafe on !Darwin
Windows objects to the multiple different aliases for `swift_isStackAllocationSafe`. Use strong linkage on all non-ABI stable targets. This should repair the Windows build and matches the conditional emission in the stdlib. Thanks to @lorentey for the discussion around how to handle this and the pointer to where this was getting introduced!
1 parent 37de862 commit d001831

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stdlib/public/SwiftShims/RuntimeShims.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ __swift_size_t _swift_stdlib_getHardwareConcurrency(void);
9393
///
9494
/// This function is used by
9595
/// @c withUnsafeTemporaryAllocation(byteCount:alignment:_:).
96-
SWIFT_RUNTIME_STDLIB_API SWIFT_WEAK_IMPORT
96+
SWIFT_RUNTIME_STDLIB_API
97+
#if defined(__APPLE__) && defined(__MACH__)
98+
SWIFT_WEAK_IMPORT
99+
#endif
97100
__swift_bool swift_stdlib_isStackAllocationSafe(__swift_size_t byteCount,
98101
__swift_size_t alignment);
99102

0 commit comments

Comments
 (0)