Bläddra i källkod

Merge branch 'master' of https://github.com/odin-lang/Odin

gingerBill 6 månader sedan
förälder
incheckning
ee84487106
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/llvm_backend.cpp

+ 2 - 2
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);
 				}
 			}