mirror of
https://github.com/ziglang/zig.git
synced 2026-02-07 06:57:13 +00:00
macos: discontinue redundant search/link for libc
This commit is contained in:
parent
f40c6a5c47
commit
f3ff0b6e6d
@ -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(
|
||||
|
||||
@ -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).?;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user