| ... | @@ -676,27 +676,6 @@ pub fn resolveLibSystem( | ... | @@ -676,27 +676,6 @@ pub fn resolveLibSystem( |
| 676 | .weak = false, | 676 | .weak = false, |
| 677 | .path = libsystem_path, | 677 | .path = libsystem_path, |
| 678 | }); | 678 | }); |
| 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 | } | | |
| 700 | } | 679 | } |
| 701 | | 680 | |
| 702 | fn accessLibPath( | 681 | fn accessLibPath( |