aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/Build.zig')
-rw-r--r--lib/std/Build.zig11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/std/Build.zig b/lib/std/Build.zig
index 29499d8767..317e4600a4 100644
--- a/lib/std/Build.zig
+++ b/lib/std/Build.zig
@@ -1762,7 +1762,10 @@ fn supportedWindowsProgramExtension(ext: []const u8) bool {
}
fn tryFindProgram(b: *Build, full_path: []const u8) ?[]const u8 {
- if (fs.realpathAlloc(b.allocator, full_path)) |p| {
+ const io = b.graph.io;
+ const arena = b.allocator;
+
+ if (Io.Dir.realPathFileAbsoluteAlloc(io, full_path, arena)) |p| {
return p;
} else |err| switch (err) {
error.OutOfMemory => @panic("OOM"),
@@ -1776,7 +1779,11 @@ fn tryFindProgram(b: *Build, full_path: []const u8) ?[]const u8 {
while (it.next()) |ext| {
if (!supportedWindowsProgramExtension(ext)) continue;
- return fs.realPathFileAlloc(b.graph.io, b.fmt("{s}{s}", .{ full_path, ext }), b.allocator) catch |err| switch (err) {
+ return Io.Dir.realPathFileAbsoluteAlloc(
+ io,
+ b.fmt("{s}{s}", .{ full_path, ext }),
+ arena,
+ ) catch |err| switch (err) {
error.OutOfMemory => @panic("OOM"),
else => continue,
};