wasm linker: improve error messages by making source locations more lazy

This commit is contained in:
Andrew Kelley
2024-12-30 13:22:48 -08:00
parent 7d224516c4
commit 4fccb5ae7a
5 changed files with 92 additions and 47 deletions

View File

@@ -3291,7 +3291,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle {
}));
}
try comp.link_diags.addMessagesToBundle(&bundle);
try comp.link_diags.addMessagesToBundle(&bundle, comp.bin_file);
if (comp.zcu) |zcu| {
if (bundle.root_list.items.len == 0 and zcu.compile_log_sources.count() != 0) {