authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-04-29 17:17:30-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:34-07:00
log5f626d28c14bfded775ae779dcde5b2435d4ac13
tree20d7c9d20727a6e6c08bf2f5e263f1ef8ee83846
parent1e956fda90a9fe6d832c044838a1e6278a775c50

maker: report when result_oom flag is set


1 files changed, 7 insertions(+), 1 deletions(-)

lib/compiler/Maker.zig+7-1
...@@ -1528,7 +1528,6 @@ pub fn printErrorMessages(...@@ -1528,7 +1528,6 @@ pub fn printErrorMessages(
1528) !void {1528) !void {
1529 const c = &maker.scanned_config.configuration;1529 const c = &maker.scanned_config.configuration;
1530 const gpa = maker.gpa;1530 const gpa = maker.gpa;
1531 log.err("TODO also report if result_oom flag is set", .{});
1532 const writer = stderr.writer;1531 const writer = stderr.writer;
1533 if (error_style.verboseContext()) {1532 if (error_style.verboseContext()) {
1534 // Provide context for where these error messages are coming from by1533 // Provide context for where these error messages are coming from by
...@@ -1608,6 +1607,13 @@ pub fn printErrorMessages(...@@ -1608,6 +1607,13 @@ pub fn printErrorMessages(
1608 }1607 }
1609 }1608 }
16101609
1610 if (failing_step.result_oom) {
1611 try stderr.setColor(.red);
1612 try writer.writeAll("error information missing due to allocation failure");
1613 try stderr.setColor(.reset);
1614 try writer.writeByte('\n');
1615 }
1616
1611 try writer.writeByte('\n');1617 try writer.writeByte('\n');
1612}1618}
16131619