mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +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
1 changed files with 4 additions and 1 deletions
|
|
@ -680,7 +680,10 @@ fn sendMessage(file: std.fs.File, tag: std.zig.Client.Message.Tag) !void {
|
||||||
.tag = tag,
|
.tag = tag,
|
||||||
.bytes_len = 0,
|
.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(
|
pub fn handleVerbose(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue