mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-06-05 07:13:27 -04:00
don't try to use cold calling convention on windows
it just causes a segfault
This commit is contained in:
+6
-1
@@ -337,7 +337,12 @@ static LLVMCallConv get_llvm_cc(CodeGen *g, CallingConvention cc) {
|
||||
if (g->zig_target.arch.arch == ZigLLVM_x86 ||
|
||||
g->zig_target.arch.arch == ZigLLVM_x86_64)
|
||||
{
|
||||
return LLVMColdCallConv;
|
||||
// cold calling convention is not supported on windows
|
||||
if (g->zig_target.os == ZigLLVM_Win32) {
|
||||
return LLVMCCallConv;
|
||||
} else {
|
||||
return LLVMColdCallConv;
|
||||
}
|
||||
} else {
|
||||
return LLVMCCallConv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user