mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
Merge pull request #17531 from moosichu/fix/frameworks
Fix some frameworks not linking macos
This commit is contained in:
commit
78f2ae7f29
@ -707,6 +707,17 @@ fn accessLibPath(
|
|||||||
return true;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6956,9 +6956,9 @@ fn accessFrameworkPath(
|
|||||||
) !bool {
|
) !bool {
|
||||||
const sep = fs.path.sep_str;
|
const sep = fs.path.sep_str;
|
||||||
|
|
||||||
for (&[_][]const u8{ "tbd", "dylib" }) |ext| {
|
for (&[_][]const u8{ ".tbd", ".dylib", "" }) |ext| {
|
||||||
test_path.clearRetainingCapacity();
|
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_dir_path,
|
||||||
framework_name,
|
framework_name,
|
||||||
framework_name,
|
framework_name,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user