diff --git a/src/link/MachO.zig b/src/link/MachO.zig index f54a370a261e..425dffd6b1d5 100644 --- a/src/link/MachO.zig +++ b/src/link/MachO.zig @@ -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; } diff --git a/src/main.zig b/src/main.zig index 14d187796c8d..4b8061a528d6 100644 --- a/src/main.zig +++ b/src/main.zig @@ -6929,9 +6929,9 @@ fn accessFrameworkPath( ) !bool { const sep = fs.path.sep_str; - for (&[_][]const u8{ "tbd", "dylib" }) |ext| { + for (&[_][]const u8{ ".tbd", ".dylib", "" }) |ext| { test_path.clearRetainingCapacity(); - try test_path.writer().print("{s}" ++ sep ++ "{s}.framework" ++ sep ++ "{s}.{s}", .{ + try test_path.writer().print("{s}" ++ sep ++ "{s}.framework" ++ sep ++ "{s}{s}", .{ framework_dir_path, framework_name, framework_name,