authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-02 01:17:04 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-02 01:17:04 -08:00
log38b28a222b3b0f897c4918fd85547045c2e2bab7
tree476eb04efa4bc27629a8c05cdea74dbb1e99d82e
parentabeab3b74c5cefc398f80dc0d2ec7c7e9cd64d21

only call `exe.linkLibC();` once


1 files changed, 2 insertions(+), 4 deletions(-)

src/cmd/fetch.zig+2-4
......@@ -57,9 +57,9 @@ pub fn create_depszig(cachepath: string, dir: std.fs.Dir, top_module: zigmod.Mod
5757 \\ for (packages) |pkg| {
5858 \\ exe.addPackage(pkg.pkg.?);
5959 \\ }
60 \\ var llc = false;
6061 \\ inline for (std.meta.declarations(package_data)) |decl| {
6162 \\ const pkg = @as(Package, @field(package_data, decl.name));
62 \\ var llc = false;
6363 \\ inline for (pkg.system_libs) |item| {
6464 \\ exe.linkSystemLibrary(item);
6565 \\ llc = true;
......@@ -72,10 +72,8 @@ pub fn create_depszig(cachepath: string, dir: std.fs.Dir, top_module: zigmod.Mod
7272 \\ exe.addCSourceFile(@field(dirs, decl.name) ++ "/" ++ item, pkg.c_source_flags);
7373 \\ llc = true;
7474 \\ }
75 \\ if (llc) {
76 \\ exe.linkLibC();
77 \\ }
7875 \\ }
76 \\ if (llc) exe.linkLibC();
7977 \\}
8078 \\
8179 \\pub const Package = struct {