From a71bfc249d3f814d7d659fe5cf4cb582483e8938 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 10 Apr 2019 18:47:14 -0400 Subject: compiler-rt: better way to do the ABI required on Windows This removes the compiler_rt.setXmm0 hack. Instead, for the functions that use i128 or u128 in their parameter and return types, we use `@Vector(2, u64)` which generates the LLVM IR `<2 x i64>` type that matches what Clang generates for `typedef int ti_int __attribute__ ((mode (TI)))` when targeting Windows x86_64. --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 568344fc09..7d21787809 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -424,7 +424,7 @@ static uint32_t get_err_ret_trace_arg_index(CodeGen *g, ZigFn *fn_table_entry) { } static void maybe_export_dll(CodeGen *g, LLVMValueRef global_value, GlobalLinkageId linkage) { - if (linkage != GlobalLinkageIdInternal && g->zig_target->os == OsWindows) { + if (linkage != GlobalLinkageIdInternal && g->zig_target->os == OsWindows && g->is_dynamic) { LLVMSetDLLStorageClass(global_value, LLVMDLLExportStorageClass); } } -- cgit v1.2.3