commit f3ff0b6e6df1148978bab32c9f37bfcd3452fad0 (tree)
parent f40c6a5c47b83bce7ef09afcecc1de621e19d4fa
Author: Michael Dusan <michael.dusan@gmail.com>
Date: Sat, 23 Sep 2023 12:44:54 -0400
macos: discontinue redundant search/link for libc
Diffstat:
2 files changed, 0 insertions(+), 22 deletions(-)
diff --git a/src/link/MachO.zig b/src/link/MachO.zig
@@ -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(
diff --git a/src/link/MachO/zld.zig b/src/link/MachO/zld.zig
@@ -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).?;