mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
don't try to use cold calling convention on windows
it just causes a segfault
This commit is contained in:
parent
08708ea4dc
commit
6db589fff5
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user