zig/test/behavior
BratishkaErik 941677e083
std.Build: add addLibrary function (#22554)
Acts as a replacement for `addSharedLibrary` and `addStaticLibrary`, but
linking mode can be changed more easily in build.zig, for example:

In library:
```zig
const linkage = b.option(std.builtin.LinkMode, "linkage", "Link mode for a foo_bar library") orelse .static; // or other default

const lib = b.addLibrary(.{
    .linkage = linkage,
    .name = "foo_bar",
    .root_module = mod,
});
```

In consumer:
```zig
const dep_foo_bar = b.dependency("foo_bar", .{
    .target = target,
    .optimize = optimize,
    .linkage = .static // or dynamic
});

mod.linkLibrary(dep_foor_bar.artifact("foo_bar"));
```

It also matches nicely with `linkLibrary` name.

Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
2025-01-22 02:29:21 +00:00
..
2025-01-20 14:47:07 -05:00
2025-01-16 20:42:08 -05:00
2024-06-13 02:19:40 -07:00
2025-01-16 20:42:08 -05:00
2025-01-16 20:47:30 -05:00
2024-06-16 11:53:33 +02:00
2024-06-13 02:24:39 -07:00
2025-01-16 20:42:08 -05:00
2025-01-16 20:47:30 -05:00
2024-05-11 02:17:24 -07:00
2024-06-13 02:20:47 -07:00
2025-01-16 20:42:08 -05:00
2024-07-26 04:19:58 -07:00
2025-01-16 20:47:30 -05:00
2024-06-13 02:20:47 -07:00
2024-07-26 04:19:55 -07:00
2024-06-13 02:20:47 -07:00
2024-06-13 02:24:39 -07:00
2024-10-13 01:58:11 +02:00
2024-06-13 02:24:39 -07:00
2024-06-13 02:22:33 -07:00
2024-06-10 20:32:49 +02:00
2024-10-13 01:58:11 +02:00
2024-06-13 02:24:39 -07:00
2024-06-13 02:20:47 -07:00
2025-01-16 20:47:30 -05:00
2024-06-13 02:22:33 -07:00
2024-06-13 02:24:39 -07:00
2025-01-16 20:47:30 -05:00