aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-04-10 18:47:14 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-04-10 18:47:14 -0400
commita71bfc249d3f814d7d659fe5cf4cb582483e8938 (patch)
tree0b1b26bbb96a02eebbd05dbe9cf16fd06412d8d6 /src/codegen.cpp
parent52934851f2b7a5cb28a08beafa1ec1aa24a3a4cb (diff)
downloadzig-a71bfc249d3f814d7d659fe5cf4cb582483e8938.tar.gz
zig-a71bfc249d3f814d7d659fe5cf4cb582483e8938.zip
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.
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}
}