authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-11-17 01:51:11+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-19 01:42:45+01:00
log092299036705eb597f6c9c3c1cb9939d5fb9d131
treea650df7370ea593210c25eed4a2f81f1799b0811
parentcd7d8dff26280146a720d907755a41406de4d510
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Build.Step: send messages to compiler as little-endian

Little-endian is what `std.zig.Server` expects, but the old logic just send the raw bytes of the struct, so sent in native endian (causing a crash on big-endian targets).

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

lib/std/Build/Step.zig+4-1
......@@ -680,7 +680,10 @@ fn sendMessage(file: std.fs.File, tag: std.zig.Client.Message.Tag) !void {
680680 .tag = tag,
681681 .bytes_len = 0,
682682 };
683 try file.writeAll(std.mem.asBytes(&header));
683 var w = file.writer(&.{});
684 w.interface.writeStruct(header, .little) catch |err| switch (err) {
685 error.WriteFailed => return w.err.?,
686 };
684687}
685688
686689pub fn handleVerbose(