link/MachO: fix --verbose-link ensureCapacity bug

This commit is contained in:
Andrew Kelley 2021-05-08 11:24:07 -07:00
parent 84d5cc31c5
commit fed1c9c3ec

View File

@ -687,10 +687,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
try argv.append("zig");
try argv.append("ld");
try argv.ensureCapacity(input_files.items.len);
for (input_files.items) |f| {
argv.appendAssumeCapacity(f);
}
try argv.appendSlice(input_files.items);
try argv.append("-o");
try argv.append(full_out_path);