authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-07-05 11:34:13-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-07-05 11:34:13-07:00
logbf588f67d8c6261105f81fd468c420d662541d2a
treefae6f30d7280008ab3050f5a5066b6e1c90f9ab6
parentb3afba8a70af984423fc24e5b834df966693b50a

build system: add docs to LinkSystemLibraryOptions


1 files changed, 22 insertions(+), 0 deletions(-)

lib/std/Build/Module.zig+22
......@@ -137,7 +137,18 @@ pub const IncludeDir = union(enum) {
137137};
138138
139139pub const LinkFrameworkOptions = struct {
140 /// Causes dynamic libraries to be linked regardless of whether they are
141 /// actually depended on. When false, dynamic libraries with no referenced
142 /// symbols will be omitted by the linker.
140143 needed: bool = false,
144 /// Marks all referenced symbols from this library as weak, meaning that if
145 /// a same-named symbol is provided by another compilation unit, instead of
146 /// emitting a "duplicate symbol" error, the linker will resolve all
147 /// references to the symbol with the strong version.
148 ///
149 /// When the linker encounters two weak symbols, the chosen one is
150 /// determined by the order compilation units are provided to the linker,
151 /// priority given to later ones.
141152 weak: bool = false,
142153};
143154
......@@ -414,7 +425,18 @@ pub fn iterateDependencies(
414425}
415426
416427pub const LinkSystemLibraryOptions = struct {
428 /// Causes dynamic libraries to be linked regardless of whether they are
429 /// actually depended on. When false, dynamic libraries with no referenced
430 /// symbols will be omitted by the linker.
417431 needed: bool = false,
432 /// Marks all referenced symbols from this library as weak, meaning that if
433 /// a same-named symbol is provided by another compilation unit, instead of
434 /// emitting a "duplicate symbol" error, the linker will resolve all
435 /// references to the symbol with the strong version.
436 ///
437 /// When the linker encounters two weak symbols, the chosen one is
438 /// determined by the order compilation units are provided to the linker,
439 /// priority given to later ones.
418440 weak: bool = false,
419441 use_pkg_config: SystemLib.UsePkgConfig = .yes,
420442 preferred_link_mode: std.builtin.LinkMode = .dynamic,