diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-07-05 11:34:13 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-07-05 11:34:13 -0700 |
| commit | bf588f67d8c6261105f81fd468c420d662541d2a (patch) | |
| tree | fae6f30d7280008ab3050f5a5066b6e1c90f9ab6 /lib/std/Build/Module.zig | |
| parent | b3afba8a70af984423fc24e5b834df966693b50a (diff) | |
| download | zig-bf588f67d8c6261105f81fd468c420d662541d2a.tar.gz zig-bf588f67d8c6261105f81fd468c420d662541d2a.zip | |
build system: add docs to LinkSystemLibraryOptions
Diffstat (limited to 'lib/std/Build/Module.zig')
| -rw-r--r-- | lib/std/Build/Module.zig | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/std/Build/Module.zig b/lib/std/Build/Module.zig index d40e86e46a..844f69c8cd 100644 --- a/lib/std/Build/Module.zig +++ b/lib/std/Build/Module.zig @@ -137,7 +137,18 @@ pub const IncludeDir = union(enum) { }; pub const LinkFrameworkOptions = 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, }; @@ -414,7 +425,18 @@ pub fn iterateDependencies( } 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, |
