File tree 1 file changed +7
-13
lines changed
1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -311,18 +311,20 @@ pub fn build(b: *std.Build) !void {
311
311
cli .addIncludePath (libgit_src .path ("src/cli" ));
312
312
maybeAddTlsIncludes (cli , tls_dep , tls_backend );
313
313
314
- if (target .result .os .tag == .windows )
315
- cli .addCSourceFiles (.{ .root = libgit_root , .files = & cli_win32_sources })
316
- else
317
- cli .addCSourceFiles (.{ .root = libgit_root , .files = & cli_unix_sources });
318
-
319
314
cli .linkLibrary (lib );
320
315
cli .addCSourceFiles (.{
321
316
.root = libgit_root ,
322
317
.files = & cli_sources ,
323
318
// @Todo: see above
324
319
// .flags = &.{"-std=c90"},
325
320
});
321
+ cli .addCSourceFiles (.{
322
+ .root = libgit_root ,
323
+ .files = if (target .result .os .tag == .windows )
324
+ &.{"src/cli/win32/sighandler.c" }
325
+ else
326
+ &.{"src/cli/unix/sighandler.c" },
327
+ });
326
328
327
329
// independent install step so you can easily access the binary
328
330
const cli_install = b .addInstallArtifact (cli , .{});
@@ -682,14 +684,6 @@ const cli_sources = [_][]const u8{
682
684
"src/cli/progress.c" ,
683
685
};
684
686
685
- const cli_win32_sources = [_ ][]const u8 {
686
- "src/cli/win32/sighandler.c" ,
687
- };
688
-
689
- const cli_unix_sources = [_ ][]const u8 {
690
- "src/cli/unix/sighandler.c" ,
691
- };
692
-
693
687
const example_sources = [_ ][]const u8 {
694
688
"examples/add.c" ,
695
689
"examples/args.c" ,
You can’t perform that action at this time.
0 commit comments