From 87fa61bdd12f0b2625013ca6eabb5fe5479a18f4 Mon Sep 17 00:00:00 2001 From: GasInfinity Date: Wed, 11 Feb 2026 10:51:26 +0100 Subject: [PATCH] fix(codegen/llvm): teach llvm to not `dllexport` hidden exports --- src/codegen/llvm.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index b2a7d230ce..0cba671469 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -1735,7 +1735,7 @@ pub const Object = struct { } global_index.setUnnamedAddr(.default, &o.builder); - if (comp.config.dll_export_fns) + if (comp.config.dll_export_fns and first_export.opts.visibility != .hidden) global_index.setDllStorageClass(.dllexport, &o.builder); global_index.setLinkage(switch (first_export.opts.linkage) { .internal => unreachable, @@ -1794,7 +1794,7 @@ pub const Object = struct { const alias_global_index = alias_index.ptrConst(&o.builder).global; alias_global_index.setUnnamedAddr(.default, &o.builder); - if (comp.config.dll_export_fns) + if (comp.config.dll_export_fns and first_export.opts.visibility != .hidden) alias_global_index.setDllStorageClass(.dllexport, &o.builder); alias_global_index.setLinkage(switch (first_export.opts.linkage) { .internal => unreachable,