| ... | @@ -1011,6 +1011,10 @@ pub const LibExeObjStep = struct { | ... | @@ -1011,6 +1011,10 @@ pub const LibExeObjStep = struct { |
| 1011 | self.full_path_libs.append(lib.getOutputPath()) catch unreachable; | 1011 | self.full_path_libs.append(lib.getOutputPath()) catch unreachable; |
| 1012 | } | 1012 | } |
| 1013 | | 1013 | |
| | 1014 | if (lib.link_libs.exists("c")) { |
| | 1015 | self.link_libs.put("c") catch unreachable; |
| | 1016 | } |
| | 1017 | |
| 1014 | // TODO should be some kind of isolated directory that only has this header in it | 1018 | // TODO should be some kind of isolated directory that only has this header in it |
| 1015 | self.include_dirs.append(self.builder.cache_root) catch unreachable; | 1019 | self.include_dirs.append(self.builder.cache_root) catch unreachable; |
| 1016 | self.need_flat_namespace_hack = true; | 1020 | self.need_flat_namespace_hack = true; |
| ... | @@ -1266,7 +1270,7 @@ pub const LibExeObjStep = struct { | ... | @@ -1266,7 +1270,7 @@ pub const LibExeObjStep = struct { |
| 1266 | zig_args.append(output_lib_path) catch unreachable; | 1270 | zig_args.append(output_lib_path) catch unreachable; |
| 1267 | } | 1271 | } |
| 1268 | | 1272 | |
| 1269 | if (self.kind != Kind.Exe) { | 1273 | if (self.kind != Kind.Exe and self.root_src != null) { |
| 1270 | const output_h_path = self.getOutputHPath(); | 1274 | const output_h_path = self.getOutputHPath(); |
| 1271 | zig_args.append("--output-h") catch unreachable; | 1275 | zig_args.append("--output-h") catch unreachable; |
| 1272 | zig_args.append(builder.pathFromRoot(output_h_path)) catch unreachable; | 1276 | zig_args.append(builder.pathFromRoot(output_h_path)) catch unreachable; |