Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

LinkSystemLibraryOptions

Public Struct
std.Build.Module.LinkSystemLibraryOptions
pub const LinkSystemLibraryOptions = struct

Fields

needed: bool = false

Causes dynamic libraries to be linked regardless of whether they are actually depended on. When false, dynamic libraries with no referenced symbols will be omitted by the linker.

weak: bool = false

Marks all referenced symbols from this library as weak, meaning that if a same-named symbol is provided by another compilation unit, instead of emitting a "duplicate symbol" error, the linker will resolve all references to the symbol with the strong version.

When the linker encounters two weak symbols, the chosen one is determined by the order compilation units are provided to the linker, priority given to later ones.

use_pkg_config: SystemLib.UsePkgConfig = .yes
preferred_link_mode: std.builtin.LinkMode = .dynamic
search_strategy: SystemLib.SearchStrategy = .paths_first

File

Build/Module.zig:322
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
pub const LinkSystemLibraryOptions = struct {
    /// Causes dynamic libraries to be linked regardless of whether they are
    /// actually depended on. When false, dynamic libraries with no referenced
    /// symbols will be omitted by the linker.
    needed: bool = false,
    /// Marks all referenced symbols from this library as weak, meaning that if
    /// a same-named symbol is provided by another compilation unit, instead of
    /// emitting a "duplicate symbol" error, the linker will resolve all
    /// references to the symbol with the strong version.
    ///
    /// When the linker encounters two weak symbols, the chosen one is
    /// determined by the order compilation units are provided to the linker,
    /// priority given to later ones.
    weak: bool = false,
    use_pkg_config: SystemLib.UsePkgConfig = .yes,
    preferred_link_mode: std.builtin.LinkMode = .dynamic,
    search_strategy: SystemLib.SearchStrategy = .paths_first,
}