diff --git a/lib/c/common.zig b/lib/c/common.zig index 8d2a79db54b33515ef75c98bf5eb1defe23cb19a..5cd94cf0ceedf73986b5b0217d4e285fac45f735 100644 --- a/lib/c/common.zig +++ b/lib/c/common.zig @@ -1,18 +1,14 @@ const builtin = @import("builtin"); const std = @import("std"); -pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test) - .internal -else - .strong; +/// It is incorrect to make this conditional on `builtin.is_test`, because it is possible that +/// libzigc is being linked into a different test compilation, as opposed to being tested itself. +pub const linkage: std.builtin.GlobalLinkage = .strong; /// 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 (linkage != .internal) - .hidden -else - .default; +pub const visibility: std.builtin.SymbolVisibility = .hidden; /// Given a low-level syscall return value, sets errno and returns `-1`, or on /// success returns the result.