authorgravatar for techatrix@mailbox.orgTechatrix <techatrix@mailbox.org> 2026-08-06 16:44:23+02:00
committergravatar for techatrix@mailbox.orgTechatrix <techatrix@mailbox.org> 2026-08-28 20:02:31+02:00
log5926dd027df2f35d4ff3610c16cfcad8e0b3a4b5
treebc23f3c9bcb4351f1ee42db76ed0d731d428d336
parent9788450cca71aa65d41a99e1ad6f7a793b93f33a
signature Signed by SSH key SHA256:HYC3SjXQcAt6uwv9pu/6OoVQ2rUH8rb5zKiUHSe9uxk

Maker: reuse global buffer for stdout


1 files changed, 2 insertions(+), 3 deletions(-)

lib/compiler/Maker.zig+2-3
...@@ -681,9 +681,8 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -681,9 +681,8 @@ pub fn main(init: process.Init.Minimal) !void {
681 } else null;681 } else null;
682682
683 var stdin_buffer: [256]u8 = undefined;683 var stdin_buffer: [256]u8 = undefined;
684 var stdout_buffer: [256]u8 = undefined;
685 var stdin_reader = Io.File.stdin().reader(io, &stdin_buffer);684 var stdin_reader = Io.File.stdin().reader(io, &stdin_buffer);
686 var stdout_writer = Io.File.stdout().writer(io, &stdout_buffer);685 const stdout_writer = initStdoutWriter(io);
687686
688 var protocol_server_allocation: AvoidableServer = undefined;687 var protocol_server_allocation: AvoidableServer = undefined;
689 const protocol_server: ?*AvoidableServer = if (listen) s: {688 const protocol_server: ?*AvoidableServer = if (listen) s: {
...@@ -693,7 +692,7 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -693,7 +692,7 @@ pub fn main(init: process.Init.Minimal) !void {
693 if (step_names.items.len > 0) fatal("build steps must be provided over the protocol instead of using CLI arguments", .{});692 if (step_names.items.len > 0) fatal("build steps must be provided over the protocol instead of using CLI arguments", .{});
694 protocol_server_allocation = .{693 protocol_server_allocation = .{
695 .in = &stdin_reader.interface,694 .in = &stdin_reader.interface,
696 .out = &stdout_writer.interface,695 .out = stdout_writer,
697 };696 };
698 try serveBspHandshake(&protocol_server_allocation);697 try serveBspHandshake(&protocol_server_allocation);
699 break :s &protocol_server_allocation;698 break :s &protocol_server_allocation;