From 6db589fff5be05e3e782a34443a1133ebc6ef17d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 30 Sep 2017 20:20:51 -0400 Subject: don't try to use cold calling convention on windows it just causes a segfault --- src/codegen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 2d7b5bb1d4..623f946307 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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; } -- cgit v1.2.3