zig/test/standalone
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
..
c_compiler test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
child_process test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
cmakedefine make zig compiler processes live across rebuilds 2024-07-14 19:51:16 -07:00
coff_dwarf std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
compiler_rt_panic test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_diamond test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_duplicate_module std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
dep_lazypath test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_mutually_recursive test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_recursive test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_shared_builtin test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dep_triangle test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
depend_on_main_mod test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
dependencyFromBuildZig do more robust import 2024-04-18 11:24:42 -07:00
dirname test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
embed_generated_file test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
emit_asm_and_bin test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
emit_asm_no_bin test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
emit_llvm_no_bin test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
empty_env test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
empty_global_error_set x86_64: fix @errorName data 2025-01-05 17:15:56 -05:00
extern std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
global_linkage std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
install_headers std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
install_raw_hex test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
ios test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_339 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_794 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_5825 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_8550 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_11595 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_12706 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
issue_13970 test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
libcxx test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
load_dynamic_library std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
mix_c_files test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
mix_o_files test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
omit_cfi test: Add a standalone test for omitting CFI directives. 2025-01-19 02:15:30 +01:00
options test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
pie test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
pkg_import test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
run_output_caching test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
run_output_paths test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
self_exe_symlink test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
shared_library std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
sigpipe compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
simple Sema: rewrite semantic analysis of function calls 2025-01-09 06:46:47 +00:00
stack_iterator std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
static_c_lib std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
strip_empty_loop test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
strip_struct_init test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
test_runner_module_imports std.Build: extend test_runner option to specify whether runner uses std.zig.Server 2025-01-20 00:14:58 +00:00
test_runner_path std.Build: extend test_runner option to specify whether runner uses std.zig.Server 2025-01-20 00:14:58 +00:00
use_alias test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
windows_argv std.Build: add addLibrary function (#22554) 2025-01-22 02:29:21 +00:00
windows_bat_args test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
windows_entry_points test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
windows_resources test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
windows_spawn test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
zerolength_check test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
build.zig test-standalone: migrate from deprecated std.Build APIs 2024-12-18 01:49:13 +05:00
build.zig.zon test: Add a standalone test for omitting CFI directives. 2025-01-19 02:15:30 +01:00