aboutsummaryrefslogtreecommitdiff
path: root/lib/c
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-05-18 20:55:56 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-05-19 00:22:03 +0200
commit092352ec63d3a4e9ff59a5d8ad8f119bf0eda468 (patch)
treedf59739ecb008fb3412477964932933c7ec1d8bc /lib/c
parent846571ce4e9840c278eb5bad1eb5221e84cf92de (diff)
downloadzig-092352ec63d3a4e9ff59a5d8ad8f119bf0eda468.tar.gz
zig-092352ec63d3a4e9ff59a5d8ad8f119bf0eda468.zip
compiler-rt, zigc: Use hidden visibility except when testing.
This prevents symbols from these libraries from polluting the dynamic symbol tables of binaries built with Zig. The downside is that we no longer deduplicate the symbols at run time due to weak linkage. Closes #7935. Closes #13303. Closes #19342.
Diffstat (limited to 'lib/c')
-rw-r--r--lib/c/common.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/c/common.zig b/lib/c/common.zig
index e9536f63b4..4419b65cc6 100644
--- a/lib/c/common.zig
+++ b/lib/c/common.zig
@@ -9,7 +9,7 @@ else
/// 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.cpu.arch.isWasm() and linkage != .internal)
+pub const visibility: std.builtin.SymbolVisibility = if (linkage != .internal)
.hidden
else
.default;