macho: flush Dwarf module before flushing dSYM

This commit is contained in:
Jakub Konka 2024-01-29 13:01:05 +01:00
parent ec757ea666
commit 78740e5540

View File

@ -206,6 +206,8 @@ pub fn flushModule(self: *DebugSymbols, macho_file: *MachO) !void {
// and it corresponds to the Zig source code.
const zcu = comp.module orelse return error.LinkingWithoutZigSourceUnimplemented;
try self.dwarf.flushModule(zcu);
for (self.relocs.items) |*reloc| {
const sym = macho_file.getSymbol(reloc.target);
const sym_name = sym.getName(macho_file);