mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
Add search for extension-less libraries (MachO)
accessLibPath now has a `noextension` block to search for extension-less libraries.
This commit is contained in:
parent
8870ead9b2
commit
023d1ac6bf
@ -707,6 +707,17 @@ fn accessLibPath(
|
||||
return true;
|
||||
}
|
||||
|
||||
noextension: {
|
||||
test_path.clearRetainingCapacity();
|
||||
try test_path.writer().print("{s}" ++ sep ++ "{s}", .{ search_dir, lib_name });
|
||||
try checked_paths.append(try gpa.dupe(u8, test_path.items));
|
||||
fs.cwd().access(test_path.items, .{}) catch |err| switch (err) {
|
||||
error.FileNotFound => break :noextension,
|
||||
else => |e| return e,
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user