diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-02-07 07:53:47 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-02-07 07:53:47 +0000 |
| commit | 58c4f13c82d57004634201562a3d334cfccf5caf (patch) | |
| tree | 5be4b95625abd4bcbc5e75dfe067e8c6ebd7599c /src/llvm_backend.cpp | |
| parent | 4667a19e77426b84b357ce410f8baf9ba09f7683 (diff) | |
| parent | 667ddc19076b118f844eff831c9cbe840918208b (diff) | |
Merge branch 'master' into bill/sdl3
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 29fa67f3f..0896ea8c7 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -169,11 +169,17 @@ 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) { + LLVMSetVisibility(other_global, LLVMHiddenVisibility); + } } } else if (ec.e->kind == Entity_Procedure) { other_global = LLVMGetNamedFunction(ec.other_module->mod, ec.cname); if (other_global) { LLVMSetLinkage(other_global, LLVMWeakAnyLinkage); + if (!ec.e->Procedure.is_export) { + LLVMSetVisibility(other_global, LLVMHiddenVisibility); + } } } } |