aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2025-03-01 15:19:51 +0000
committergingerBill <bill@gingerbill.org>2025-03-01 15:19:51 +0000
commitee84487106805fca0e43cb36e4bf0703ae6fa2d3 (patch)
treecb8e846b5c00ad5dd6281c3da7b196e7f7dd961c /src
parent211680569f93db8896fafa9693158725925138fd (diff)
parent66540b75f50315e372a74545de7fe91d04b1be62 (diff)
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'src')
-rw-r--r--src/llvm_backend.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index a9cca2695..88e099930 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -169,7 +169,7 @@ gb_internal void lb_correct_entity_linkage(lbGenerator *gen) {
other_global = LLVMGetNamedGlobal(ec.other_module->mod, ec.cname);
if (other_global) {
LLVMSetLinkage(other_global, LLVMWeakAnyLinkage);
- if (!ec.e->Variable.is_export) {
+ if (!ec.e->Variable.is_export && !ec.e->Variable.is_foreign) {
LLVMSetVisibility(other_global, LLVMHiddenVisibility);
}
}
@@ -177,7 +177,7 @@ gb_internal void lb_correct_entity_linkage(lbGenerator *gen) {
other_global = LLVMGetNamedFunction(ec.other_module->mod, ec.cname);
if (other_global) {
LLVMSetLinkage(other_global, LLVMWeakAnyLinkage);
- if (!ec.e->Procedure.is_export) {
+ if (!ec.e->Procedure.is_export && !ec.e->Procedure.is_foreign) {
LLVMSetVisibility(other_global, LLVMHiddenVisibility);
}
}