macos: discontinue redundant search/link for libc

This commit is contained in:
Michael Dusan 2023-09-23 12:44:54 -04:00
parent f40c6a5c47
commit f3ff0b6e6d
No known key found for this signature in database
GPG Key ID: ED4C5BA849FA1B74
2 changed files with 0 additions and 22 deletions

View File

@ -676,27 +676,6 @@ pub fn resolveLibSystem(
.weak = false,
.path = libsystem_path,
});
const ext = fs.path.extension(libsystem_path);
if (mem.eql(u8, ext, ".dylib")) {
// We found 'libSystem.dylib', so now we also need to look for 'libc.dylib'.
success: {
if (self.base.options.sysroot) |root| {
const dir = try fs.path.join(tmp_arena, &[_][]const u8{ root, "usr", "lib" });
if (try accessLibPath(tmp_arena, &test_path, &checked_paths, dir, "libc")) break :success;
}
for (search_dirs) |dir| if (try accessLibPath(
tmp_arena,
&test_path,
&checked_paths,
dir,
"libc",
)) break :success;
try self.reportMissingLibraryError(checked_paths.items, "unable to find libc system library", .{});
}
}
}
fn accessLibPath(

View File

@ -317,7 +317,6 @@ pub fn linkWithZld(
try argv.append(full_out_path);
try argv.append("-lSystem");
try argv.append("-lc");
for (options.system_libs.keys()) |l_name| {
const info = options.system_libs.get(l_name).?;