fix(build.zig): remove deprecated addStaticLibrary()
(cherry picked from commit 618b9dd66e)
This commit is contained in:
parent
d991edf074
commit
ad95b2b906
1 changed files with 8 additions and 10 deletions
18
build.zig
18
build.zig
|
|
@ -8,17 +8,15 @@ pub fn build(b: *std.Build) !void {
|
|||
const shared = b.option(bool, "build-shared", "Build a shared library") orelse false;
|
||||
const amalgamated = b.option(bool, "amalgamated", "Build using an amalgamated source") orelse false;
|
||||
|
||||
const lib: *std.Build.Step.Compile = if (!shared) b.addStaticLibrary(.{
|
||||
const lib: *std.Build.Step.Compile = b.addLibrary(.{
|
||||
.name = "tree-sitter",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
}) else b.addSharedLibrary(.{
|
||||
.name = "tree-sitter",
|
||||
.pic = true,
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
.linkage = if (shared) .dynamic else .static,
|
||||
.root_module = b.createModule(.{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
.pic = if (shared) true else null,
|
||||
}),
|
||||
});
|
||||
|
||||
if (amalgamated) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue