@@ -56,7 +56,11 @@ using StaticInfixWitness = SWIFT_CC(swift) bool(OpaqueValue *, OpaqueValue *,
5656// MachO doesn't support @GOT like relocations for 32 bit x86.
5757#define INDIRECT_RELREF_GOTPCREL (SYMBOL ) " L" SYMBOL " $non_lazy_ptr - . + 1"
5858#endif
59+ #endif
5960
61+ // Windows native indirect symbol references.
62+ #if defined(_WIN32)
63+ #define INDIRECT_RELREF_GOTPCREL (SYMBOL ) " __imp_" SYMBOL " - . + 1"
6064#endif
6165
6266// ===----------------------------------------------------------------------===//
@@ -97,6 +101,10 @@ __asm(
97101 #elif defined(__MACH__)
98102 " .zerofill __DATA, __bss, __swift_tupleEquatable_private, 128, 4\n "
99103 " .section __TEXT, __const\n "
104+ #elif defined(_WIN32)
105+ " .lcomm __swift_tupleEquatable_private, 128, 16\n "
106+ " .section .rdata, \" dr\"\n "
107+ #pragma comment(linker, "/EXPORT:_swift_tupleEquatable_conf,DATA")
100108 #endif
101109 " .globl " TUPLE_EQUATABLE_CONF " \n "
102110 " .p2align 2\n "
@@ -135,7 +143,7 @@ __asm(
135143 #endif
136144);
137145
138- extern const ProtocolConformanceDescriptor _swift_tupleEquatable_conf;
146+ extern " C " const ProtocolConformanceDescriptor _swift_tupleEquatable_conf;
139147
140148SWIFT_RUNTIME_EXPORT SWIFT_CC (swift)
141149bool swift::_swift_tupleEquatable_equals(OpaqueValue *tuple1,
@@ -225,6 +233,9 @@ __asm(
225233 " .section __TEXT, __swift5_typeref\n "
226234 " .globl \" " TUPLE_COMPARABLE_ASSOCIATEDCONFORMANCE " \"\n "
227235 " .weak_definition \" " TUPLE_COMPARABLE_ASSOCIATEDCONFORMANCE " \"\n "
236+ #elif defined(_WIN32)
237+ " .section .sw5tyrf$B, \" dr\" , discard, \" " TUPLE_COMPARABLE_ASSOCIATEDCONFORMANCE " \"\n "
238+ " .globl \" " TUPLE_COMPARABLE_ASSOCIATEDCONFORMANCE " \"\n "
228239 #endif
229240 " .p2align 1\n "
230241 " \" " TUPLE_COMPARABLE_ASSOCIATEDCONFORMANCE " \" :\n "
@@ -253,6 +264,10 @@ __asm(
253264 #elif defined(__MACH__)
254265 " .zerofill __DATA, __bss, __swift_tupleComparable_private, 128, 4\n "
255266 " .section __TEXT, __const\n "
267+ #elif defined(_WIN32)
268+ " .lcomm __swift_tupleComparable_private, 128, 16\n "
269+ " .section .rdata, \" dr\"\n "
270+ #pragma comment(linker, "/EXPORT:_swift_tupleComparable_conf,DATA")
256271 #endif
257272 " .globl " TUPLE_COMPARABLE_CONF " \n "
258273 " .p2align 2\n "
@@ -615,6 +630,10 @@ __asm(
615630 #elif defined(__MACH__)
616631 " .zerofill __DATA, __bss, __swift_tupleHashable_private, 128, 4\n "
617632 " .section __TEXT, __const\n "
633+ #elif defined(_WIN32)
634+ " .lcomm __swift_tupleHashable_private, 128, 16\n "
635+ " .section .rdata, \" dr\"\n "
636+ #pragma comment(linker, "/EXPORT:_swift_tupleHashable_conf,DATA")
618637 #endif
619638 " .globl " TUPLE_HASHABLE_CONF " \n "
620639 " .p2align 2\n "
0 commit comments