zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 87fa61bdd12f0b2625013ca6eabb5fe5479a18f4 (tree)
parent 96bd268c8c07b8aae0372317bfea60ef2fb3f257
Author: GasInfinity <me@gasinfinity.dev>
Date:   Wed, 11 Feb 2026 10:51:26 +0100

fix(codegen/llvm): teach llvm to not `dllexport` hidden exports

Diffstat:
Msrc/codegen/llvm.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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,