diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-08 17:14:31 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:08 -0800 |
| commit | 950d18ef695bb7a28397e080dc3c201559ec4ee2 (patch) | |
| tree | 253209139275932ed503a5ea4529594ab70df8cc /lib/std/Build/Step.zig | |
| parent | 314c906dba32e72317947a15254519b22745b13f (diff) | |
| download | zig-950d18ef695bb7a28397e080dc3c201559ec4ee2.tar.gz zig-950d18ef695bb7a28397e080dc3c201559ec4ee2.zip | |
update all access() to access(io)
Diffstat (limited to 'lib/std/Build/Step.zig')
| -rw-r--r-- | lib/std/Build/Step.zig | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig index 2ec1c0ef31..f66f8df4c8 100644 --- a/lib/std/Build/Step.zig +++ b/lib/std/Build/Step.zig @@ -519,19 +519,21 @@ pub fn installFile(s: *Step, src_lazy_path: Build.LazyPath, dest_path: []const u /// Wrapper around `Io.Dir.makePathStatus` that handles verbose and error output. pub fn installDir(s: *Step, dest_path: []const u8) !Io.Dir.MakePathStatus { const b = s.owner; + const io = b.graph.io; try handleVerbose(b, null, &.{ "install", "-d", dest_path }); - return Io.Dir.cwd().makePathStatus(dest_path) catch |err| + return Io.Dir.cwd().makePathStatus(io, dest_path, .default_dir) catch |err| return s.fail("unable to create dir '{s}': {t}", .{ dest_path, err }); } fn zigProcessUpdate(s: *Step, zp: *ZigProcess, watch: bool, web_server: ?*Build.WebServer, gpa: Allocator) !?Path { const b = s.owner; const arena = b.allocator; + const io = b.graph.io; var timer = try std.time.Timer.start(); - try sendMessage(zp.child.stdin.?, .update); - if (!watch) try sendMessage(zp.child.stdin.?, .exit); + try sendMessage(io, zp.child.stdin.?, .update); + if (!watch) try sendMessage(io, zp.child.stdin.?, .exit); var result: ?Path = null; @@ -668,12 +670,12 @@ fn clearZigProcess(s: *Step, gpa: Allocator) void { } } -fn sendMessage(file: Io.File, tag: std.zig.Client.Message.Tag) !void { +fn sendMessage(io: Io, file: Io.File, tag: std.zig.Client.Message.Tag) !void { const header: std.zig.Client.Message.Header = .{ .tag = tag, .bytes_len = 0, }; - var w = file.writer(&.{}); + var w = file.writer(io, &.{}); w.interface.writeStruct(header, .little) catch |err| switch (err) { error.WriteFailed => return w.err.?, }; |
