authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-10-16 20:45:04+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2023-10-16 20:45:04+02:00
log78f2ae7f29ff537e63227d7e88e555178fed2a34
treea2443684b20289d04d9a666451945160793cff0b
parent7b9165b37576ed4c4962c0ad2afb62921524aa08
parent023d1ac6bf25c941510509ddbb659c73947ec39b
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #17531 from moosichu/fix/frameworks

Fix some frameworks not linking macos

2 files changed, 13 insertions(+), 2 deletions(-)

src/link/MachO.zig+11
......@@ -707,6 +707,17 @@ fn accessLibPath(
707707 return true;
708708 }
709709
710 noextension: {
711 test_path.clearRetainingCapacity();
712 try test_path.writer().print("{s}" ++ sep ++ "{s}", .{ search_dir, lib_name });
713 try checked_paths.append(try gpa.dupe(u8, test_path.items));
714 fs.cwd().access(test_path.items, .{}) catch |err| switch (err) {
715 error.FileNotFound => break :noextension,
716 else => |e| return e,
717 };
718 return true;
719 }
720
710721 return false;
711722}
712723
src/main.zig+2-2
......@@ -6956,9 +6956,9 @@ fn accessFrameworkPath(
69566956) !bool {
69576957 const sep = fs.path.sep_str;
69586958
6959 for (&[_][]const u8{ "tbd", "dylib" }) |ext| {
6959 for (&[_][]const u8{ ".tbd", ".dylib", "" }) |ext| {
69606960 test_path.clearRetainingCapacity();
6961 try test_path.writer().print("{s}" ++ sep ++ "{s}.framework" ++ sep ++ "{s}.{s}", .{
6961 try test_path.writer().print("{s}" ++ sep ++ "{s}.framework" ++ sep ++ "{s}{s}", .{
69626962 framework_dir_path,
69636963 framework_name,
69646964 framework_name,