| ... | @@ -1331,6 +1331,8 @@ pub fn flushStaticLib(self: *Elf, comp: *Compilation, module_obj_path: ?[]const | ... | @@ -1331,6 +1331,8 @@ pub fn flushStaticLib(self: *Elf, comp: *Compilation, module_obj_path: ?[]const |
| 1331 | }; | 1331 | }; |
| 1332 | } | 1332 | } |
| 1333 | | 1333 | |
| | 1334 | if (self.misc_errors.items.len > 0) return error.FlushFailure; |
| | 1335 | |
| 1334 | // First, we flush relocatable object file generated with our backends. | 1336 | // First, we flush relocatable object file generated with our backends. |
| 1335 | if (self.zigObjectPtr()) |zig_object| { | 1337 | if (self.zigObjectPtr()) |zig_object| { |
| 1336 | zig_object.resolveSymbols(self); | 1338 | zig_object.resolveSymbols(self); |
| ... | @@ -1468,11 +1470,15 @@ pub fn flushObject(self: *Elf, comp: *Compilation, module_obj_path: ?[]const u8) | ... | @@ -1468,11 +1470,15 @@ pub fn flushObject(self: *Elf, comp: *Compilation, module_obj_path: ?[]const u8) |
| 1468 | }; | 1470 | }; |
| 1469 | } | 1471 | } |
| 1470 | | 1472 | |
| | 1473 | if (self.misc_errors.items.len > 0) return error.FlushFailure; |
| | 1474 | |
| 1471 | // Init all objects | 1475 | // Init all objects |
| 1472 | for (self.objects.items) |index| { | 1476 | for (self.objects.items) |index| { |
| 1473 | try self.file(index).?.object.init(self); | 1477 | try self.file(index).?.object.init(self); |
| 1474 | } | 1478 | } |
| 1475 | | 1479 | |
| | 1480 | if (self.misc_errors.items.len > 0) return error.FlushFailure; |
| | 1481 | |
| 1476 | // Now, we are ready to resolve the symbols across all input files. | 1482 | // Now, we are ready to resolve the symbols across all input files. |
| 1477 | // We will first resolve the files in the ZigObject, next in the parsed | 1483 | // We will first resolve the files in the ZigObject, next in the parsed |
| 1478 | // input Object files. | 1484 | // input Object files. |