File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,15 @@ pub fn build(b: *std.Build) !void {
88 const shared = b .option (bool , "build-shared" , "Build a shared library" ) orelse false ;
99 const amalgamated = b .option (bool , "amalgamated" , "Build using an amalgamated source" ) orelse false ;
1010
11- const lib : * std.Build.Step.Compile = if ( ! shared ) b . addStaticLibrary (.{
11+ const lib : * std.Build.Step.Compile = b . addLibrary (.{
1212 .name = "tree-sitter" ,
13- .target = target ,
14- .optimize = optimize ,
15- .link_libc = true ,
16- }) else b .addSharedLibrary (.{
17- .name = "tree-sitter" ,
18- .pic = true ,
19- .target = target ,
20- .optimize = optimize ,
21- .link_libc = true ,
13+ .linkage = if (shared ) .dynamic else .static ,
14+ .root_module = b .createModule (.{
15+ .target = target ,
16+ .optimize = optimize ,
17+ .link_libc = true ,
18+ .pic = if (shared ) true else null ,
19+ }),
2220 });
2321
2422 if (amalgamated ) {
You can’t perform that action at this time.
0 commit comments