link.Elf.ZigObject.updateFunc: reduce data dependencies

Unfortunately it's not a complete solution, so a follow-up commit will
need to do something more drastic like not do the linker task queue at
the same time as codegen task queue.

From that point, it is possible to do more work at the same time but
that should be a separate branch. This one has gotten big enough.
This commit is contained in:
Andrew Kelley
2024-10-22 15:04:08 -07:00
parent e0623df9f7
commit 989e782a01
4 changed files with 17 additions and 23 deletions

View File

@@ -866,7 +866,7 @@ fn genNavRef(
zo.symbol(sym_index).flags.is_extern_ptr = true;
return .{ .mcv = .{ .lea_symbol = sym_index } };
}
const sym_index = try zo.getOrCreateMetadataForNav(elf_file, nav_index);
const sym_index = try zo.getOrCreateMetadataForNav(zcu, nav_index);
if (!single_threaded and is_threadlocal) {
return .{ .mcv = .{ .load_tlv = sym_index } };
}