mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 00:08:56 +00:00
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).
This commit is contained in:
parent
cd7d8dff26
commit
0922990367
@ -680,7 +680,10 @@ fn sendMessage(file: std.fs.File, tag: std.zig.Client.Message.Tag) !void {
|
||||
.tag = tag,
|
||||
.bytes_len = 0,
|
||||
};
|
||||
try file.writeAll(std.mem.asBytes(&header));
|
||||
var w = file.writer(&.{});
|
||||
w.interface.writeStruct(header, .little) catch |err| switch (err) {
|
||||
error.WriteFailed => return w.err.?,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn handleVerbose(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user