authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2023-09-23 12:44:54-04:00
committergravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2023-09-25 15:53:04-04:00
logf3ff0b6e6df1148978bab32c9f37bfcd3452fad0
tree629f19720e328031cde0d2576e841903530ebc1f
parentf40c6a5c47b83bce7ef09afcecc1de621e19d4fa
signaturelock-open Commit is signed but in an unrecognized format.

macos: discontinue redundant search/link for libc


2 files changed, 0 insertions(+), 22 deletions(-)

src/link/MachO.zig-21
......@@ -676,27 +676,6 @@ pub fn resolveLibSystem(
676676 .weak = false,
677677 .path = libsystem_path,
678678 });
679
680 const ext = fs.path.extension(libsystem_path);
681 if (mem.eql(u8, ext, ".dylib")) {
682 // We found 'libSystem.dylib', so now we also need to look for 'libc.dylib'.
683 success: {
684 if (self.base.options.sysroot) |root| {
685 const dir = try fs.path.join(tmp_arena, &[_][]const u8{ root, "usr", "lib" });
686 if (try accessLibPath(tmp_arena, &test_path, &checked_paths, dir, "libc")) break :success;
687 }
688
689 for (search_dirs) |dir| if (try accessLibPath(
690 tmp_arena,
691 &test_path,
692 &checked_paths,
693 dir,
694 "libc",
695 )) break :success;
696
697 try self.reportMissingLibraryError(checked_paths.items, "unable to find libc system library", .{});
698 }
699 }
700679}
701680
702681fn accessLibPath(
src/link/MachO/zld.zig-1
......@@ -317,7 +317,6 @@ pub fn linkWithZld(
317317 try argv.append(full_out_path);
318318
319319 try argv.append("-lSystem");
320 try argv.append("-lc");
321320
322321 for (options.system_libs.keys()) |l_name| {
323322 const info = options.system_libs.get(l_name).?;