Skip to content

Commit 8962955

Browse files
committed
SwiftRemoteMirror: do not mark as weak import on Windows
Weak import semantics are not available on PE/COFF. Ensure that we do not mark the type as having weak import semantics. Otherwise, the dllimport'ed symbol is marked as `dso_local` which is invalid.
1 parent bf0c091 commit 8962955

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/swift/SwiftRemoteMirror/SwiftRemoteMirror.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
extern "C" {
3838
#endif
3939

40-
SWIFT_REMOTE_MIRROR_LINKAGE __attribute__((__weak_import__))
40+
SWIFT_REMOTE_MIRROR_LINKAGE
41+
#if !defined(_WIN32)
42+
__attribute__((__weak_import__))
43+
#endif
4144
extern unsigned long long swift_reflection_classIsSwiftMask;
4245

4346
/// Get the metadata version supported by the Remote Mirror library.

0 commit comments

Comments
 (0)