Skip to content

Commit 85d08fa

Browse files
committed
swift: export the objc_retainAutoReleaseReturnValue
Export the stub that we provide for swift programs on Windows. This is used by CoreFoundation and thus is needed for the Foundation port on Windows.
1 parent 24906a0 commit 85d08fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/swift/DispatchStubs.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
#include <dispatch/dispatch.h>
1414
#include <stdio.h>
1515

16+
#if defined(__ELF__) || defined(__MACH__) || defined(__WASM__)
1617
#define DISPATCH_RUNTIME_STDLIB_INTERFACE __attribute__((__visibility__("default")))
18+
#else
19+
#define DISPATCH_RUNTIME_STDLIB_INTERFACE __declspec(dllexport)
20+
#endif
1721

1822
#if USE_OBJC
1923
@protocol OS_dispatch_source;
@@ -54,6 +58,7 @@ static void _dispatch_overlay_constructor() {
5458
#endif /* USE_OBJC */
5559

5660
#if !USE_OBJC
61+
DISPATCH_RUNTIME_STDLIB_INTERFACE
5762
extern "C" void * objc_retainAutoreleasedReturnValue(void *obj);
5863
#endif
5964

0 commit comments

Comments
 (0)