Skip to content

Commit b6e4b17

Browse files
committed
tidy sources
1 parent ac411fd commit b6e4b17

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

build.zig

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,20 @@ pub fn build(b: *std.Build) !void {
311311
cli.addIncludePath(libgit_src.path("src/cli"));
312312
maybeAddTlsIncludes(cli, tls_dep, tls_backend);
313313

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-
319314
cli.linkLibrary(lib);
320315
cli.addCSourceFiles(.{
321316
.root = libgit_root,
322317
.files = &cli_sources,
323318
// @Todo: see above
324319
// .flags = &.{"-std=c90"},
325320
});
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+
});
326328

327329
// independent install step so you can easily access the binary
328330
const cli_install = b.addInstallArtifact(cli, .{});
@@ -682,14 +684,6 @@ const cli_sources = [_][]const u8{
682684
"src/cli/progress.c",
683685
};
684686

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-
693687
const example_sources = [_][]const u8{
694688
"examples/add.c",
695689
"examples/args.c",

0 commit comments

Comments
 (0)