zig

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

common.zig (457B) - Raw


      1 const builtin = @import("builtin");
      2 const std = @import("std");
      3 
      4 pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test)
      5     .internal
      6 else
      7     .strong;
      8 
      9 /// Determines the symbol's visibility to other objects.
     10 /// For WebAssembly this allows the symbol to be resolved to other modules, but will not
     11 /// export it to the host runtime.
     12 pub const visibility: std.builtin.SymbolVisibility = if (linkage != .internal)
     13     .hidden
     14 else
     15     .default;