Commit 9b631b2b32

Andrew Kelley <andrew@ziglang.org>
2023-04-14 22:06:01
compiler_rt: use default visibility for non-exported symbols
1 parent 4a233d1
Changed files (1)
lib
compiler_rt
lib/compiler_rt/common.zig
@@ -6,7 +6,8 @@ pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test) .Internal el
 /// Determines the symbol's visibility to other objects.
 /// For WebAssembly this allows the symbol to be resolved to other modules, but will not
 /// export it to the host runtime.
-pub const visibility: std.builtin.SymbolVisibility = if (builtin.target.isWasm()) .hidden else .default;
+pub const visibility: std.builtin.SymbolVisibility =
+    if (builtin.target.isWasm() and linkage != .Internal) .hidden else .default;
 pub const want_aeabi = switch (builtin.abi) {
     .eabi,
     .eabihf,