Add search for extension-less libraries (MachO)

accessLibPath now has a `noextension` block to search for extension-less
libraries.
This commit is contained in:
Tom Read Cutting 2023-10-15 17:11:44 +01:00
parent 8870ead9b2
commit 023d1ac6bf

View File

@ -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;
}