Commit 39adc228d8

Jakub Konka <kubkon@jakubkonka.com>
2024-05-09 16:20:18
link/macho: look in lib dirs (-L) for libSystem too
1 parent 2e1fc0d
Changed files (1)
src
src/link/MachO.zig
@@ -891,6 +891,10 @@ pub fn resolveLibSystem(
             },
         };
 
+        for (self.lib_dirs) |dir| {
+            if (try accessLibPath(arena, &test_path, &checked_paths, dir, "System")) break :success;
+        }
+
         try self.reportMissingLibraryError(checked_paths.items, "unable to find libSystem system library", .{});
         return error.MissingLibSystem;
     }