| Age | Commit message (Collapse) | Author |
|
|
|
It's better to avoid references to this global variable, but, in the
cases where it's needed, such as in std.debug.print and collecting stack
traces, better to share the same instance.
|
|
|
|
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>
|
|
|
|
|
|
This is a temporary workaround that can be revered if/when 'path'
lazy paths are updated to encode which build root they are relative to.
|
|
Also renames `addHeaders` to `addHeadersDirectory` for clarity.
|
|
Added test coverage for `installLibraryHeaders`
|
|
|
|
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
|