aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 6cc8502461..0816322f60 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -2609,6 +2609,9 @@ pub fn totalErrorCount(self: *Compilation) u32 {
}
total += @intFromBool(self.link_error_flags.missing_libc);
+ // Misc linker errors
+ total += self.bin_file.miscErrors().len;
+
// Compile log errors only count if there are no other errors.
if (total == 0) {
if (self.bin_file.options.module) |module| {
@@ -2759,6 +2762,19 @@ pub fn getAllErrorsAlloc(self: *Compilation) !ErrorBundle {
}));
}
+ for (self.bin_file.miscErrors()) |link_err| {
+ try bundle.addRootErrorMessage(.{
+ .msg = try bundle.addString(link_err.msg),
+ .notes_len = @intCast(link_err.notes.len),
+ });
+ const notes_start = try bundle.reserveNotes(@intCast(link_err.notes.len));
+ for (link_err.notes, 0..) |note, i| {
+ bundle.extra.items[notes_start + i] = @intFromEnum(try bundle.addErrorMessage(.{
+ .msg = try bundle.addString(note.msg),
+ }));
+ }
+ }
+
if (self.bin_file.options.module) |module| {
if (bundle.root_list.items.len == 0 and module.compile_log_decls.count() != 0) {
const keys = module.compile_log_decls.keys();