aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2024-08-12 21:57:14 +0200
committerJakub Konka <kubkon@jakubkonka.com>2024-08-13 13:30:24 +0200
commitf968dd0cb1fc9197fc6483ce235b037f6c86c8ce (patch)
tree67404d9fb0b98411654f35aeebdc6809a17a37a4 /src
parent5fd53dc36fb019a0930a9be0700411bb04c688a1 (diff)
downloadzig-f968dd0cb1fc9197fc6483ce235b037f6c86c8ce.tar.gz
zig-f968dd0cb1fc9197fc6483ce235b037f6c86c8ce.zip
comp: actually report codegen errors
Diffstat (limited to 'src')
-rw-r--r--src/Compilation.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index d7dabd5164..0beb960d02 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -3092,6 +3092,10 @@ pub fn totalErrorCount(comp: *Compilation) u32 {
if (zcu.intern_pool.global_error_set.getNamesFromMainThread().len > zcu.error_limit) {
total += 1;
}
+
+ for (zcu.failed_codegen.keys()) |_| {
+ total += 1;
+ }
}
// The "no entry point found" error only counts if there are no semantic analysis errors.
@@ -3237,6 +3241,9 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle {
}
}
}
+ for (zcu.failed_codegen.values()) |error_msg| {
+ try addModuleErrorMsg(zcu, &bundle, error_msg.*, &all_references);
+ }
for (zcu.failed_exports.values()) |value| {
try addModuleErrorMsg(zcu, &bundle, value.*, &all_references);
}