Skip to content

Commit 5b01795

Browse files
committed
Don't use swift calling convention for now with clang-cl on Windows to work around a crasher
1 parent 3ef5ef0 commit 5b01795

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/swift/Runtime/Config.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
/// Does the current Swift platform use LLVM's intrinsic "swiftcall"
3737
/// calling convention for Swift functions?
3838
#ifndef SWIFT_USE_SWIFTCALL
39-
#if __has_attribute(swiftcall) || defined(__linux__)
39+
// Clang doesn't support mangling functions with the swiftcall attribute
40+
// on Windows and crashes during compilation: http://bugs.llvm.org/show_bug.cgi?id=32000
41+
#if (__has_attribute(swiftcall) || defined(__linux__)) && !defined(_WIN32)
4042
#define SWIFT_USE_SWIFTCALL 1
4143
#else
4244
#define SWIFT_USE_SWIFTCALL 0

0 commit comments

Comments
 (0)