Function linkSystemLibrary [src]

Prototype

pub fn linkSystemLibrary( m: *Module, name: []const u8, options: LinkSystemLibraryOptions, ) void

Parameters

m: *Modulename: []const u8options: LinkSystemLibraryOptions

Source

pub fn linkSystemLibrary( m: *Module, name: []const u8, options: LinkSystemLibraryOptions, ) void { const b = m.owner; const target = m.requireKnownTarget(); if (std.zig.target.isLibCLibName(target, name)) { m.link_libc = true; return; } if (std.zig.target.isLibCxxLibName(target, name)) { m.link_libcpp = true; return; } m.link_objects.append(b.allocator, .{ .system_lib = .{ .name = b.dupe(name), .needed = options.needed, .weak = options.weak, .use_pkg_config = options.use_pkg_config, .preferred_link_mode = options.preferred_link_mode, .search_strategy = options.search_strategy, }, }) catch @panic("OOM"); }