aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-08 17:14:31 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:08 -0800
commit950d18ef695bb7a28397e080dc3c201559ec4ee2 (patch)
tree253209139275932ed503a5ea4529594ab70df8cc /lib/std/Build/Step.zig
parent314c906dba32e72317947a15254519b22745b13f (diff)
downloadzig-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.zig12
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.?,
};