| ... | ... | @@ -1032,7 +1032,7 @@ pub const CLibExeObjStep = struct { |
| 1032 | 1032 | |
| 1033 | 1033 | pub fn createSharedLibrary(builder: &Builder, name: []const u8, version: &const Version) -> &CLibExeObjStep { |
| 1034 | 1034 | const self = %%builder.allocator.create(CLibExeObjStep); |
| 1035 | | *self = init(builder, name, Kind.Lib, builder.version(0, 0, 0), false); |
| 1035 | *self = init(builder, name, Kind.Lib, version, false); |
| 1036 | 1036 | return self; |
| 1037 | 1037 | } |
| 1038 | 1038 | |
| ... | ... | @@ -1238,7 +1238,24 @@ pub const CLibExeObjStep = struct { |
| 1238 | 1238 | } |
| 1239 | 1239 | |
| 1240 | 1240 | if (self.static) { |
| 1241 | | debug.panic("TODO static library"); |
| 1241 | // ar |
| 1242 | %%cc_args.resize(0); |
| 1243 | %%cc_args.append("qc"); |
| 1244 | |
| 1245 | const output_path = builder.pathFromRoot(self.getOutputPath()); |
| 1246 | %%cc_args.append(output_path); |
| 1247 | |
| 1248 | for (self.object_files.toSliceConst()) |object_file| { |
| 1249 | %%cc_args.append(builder.pathFromRoot(object_file)); |
| 1250 | } |
| 1251 | |
| 1252 | %return builder.spawnChild("ar", cc_args.toSliceConst()); |
| 1253 | |
| 1254 | // ranlib |
| 1255 | %%cc_args.resize(0); |
| 1256 | %%cc_args.append(output_path); |
| 1257 | |
| 1258 | %return builder.spawnChild("ranlib", cc_args.toSliceConst()); |
| 1242 | 1259 | } else { |
| 1243 | 1260 | %%cc_args.resize(0); |
| 1244 | 1261 | |