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

This commit is contained in:
GasInfinity 2026-02-11 10:51:26 +01:00
parent 96bd268c8c
commit 87fa61bdd1
No known key found for this signature in database

View file

@ -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,