| ... | ... | @@ -54,6 +54,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 54 | 54 | try w.writeAll("const string = []const u8;\n"); |
| 55 | 55 | try w.writeAll("\n"); |
| 56 | 56 | try w.print("pub const cache = \"{}\";\n", .{std.zig.fmtEscapes(cachepath)}); |
| 57 | try w.writeAll("pub var skip_libc = false;\n"); |
| 57 | 58 | try w.writeAll("\n"); |
| 58 | 59 | try w.writeAll( |
| 59 | 60 | \\pub fn addAllTo(exe: *std.Build.Step.Compile) void { |
| ... | ... | @@ -92,6 +93,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 92 | 93 | \\ const result = b.createModule(.{ |
| 93 | 94 | \\ .target = exe.root_module.resolved_target, |
| 94 | 95 | \\ }); |
| 96 | \\ const target = result.resolved_target.?.result; |
| 95 | 97 | \\ if (self.import) |capture| { |
| 96 | 98 | \\ result.root_source_file = capture[1]; |
| 97 | 99 | \\ } |
| ... | ... | @@ -117,6 +119,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 117 | 119 | \\ link_lib_c = true; |
| 118 | 120 | \\ } |
| 119 | 121 | \\ for (self.system_libs) |item| { |
| 122 | \\ if (skip_libc and std.zig.target.isLibCLibName(target, item)) continue; |
| 120 | 123 | \\ result.linkSystemLibrary(item, .{}); |
| 121 | 124 | \\ exe.linkSystemLibrary(item); |
| 122 | 125 | \\ link_lib_c = true; |
| ... | ... | @@ -126,7 +129,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 126 | 129 | \\ exe.linkFramework(item); |
| 127 | 130 | \\ link_lib_c = true; |
| 128 | 131 | \\ } |
| 129 | | \\ if (link_lib_c) { |
| 132 | \\ if (link_lib_c and !skip_libc) { |
| 130 | 133 | \\ result.link_libc = true; |
| 131 | 134 | \\ exe.linkLibC(); |
| 132 | 135 | \\ } |