mirror of
https://github.com/ziglang/zig.git
synced 2025-12-26 08:03:08 +00:00
comp: actually report codegen errors
This commit is contained in:
parent
5fd53dc36f
commit
f968dd0cb1
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user