diff options
| author | gingerBill <bill@gingerbill.org> | 2025-03-01 15:19:51 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2025-03-01 15:19:51 +0000 |
| commit | ee84487106805fca0e43cb36e4bf0703ae6fa2d3 (patch) | |
| tree | cb8e846b5c00ad5dd6281c3da7b196e7f7dd961c | |
| parent | 211680569f93db8896fafa9693158725925138fd (diff) | |
| parent | 66540b75f50315e372a74545de7fe91d04b1be62 (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
| -rw-r--r-- | src/llvm_backend.cpp | 4 |
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); } } |