mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 07:33:08 +00:00
cli: let the linker resolve libs into dynamic and static
Unlike targeting ELF-based OSes such as Linux, resolving system libs on Darwin should follow one of two strategies: `-search_paths_first` or `-search_dylibs_first` and hence we defer always forcing linking a static library to the linker.
This commit is contained in:
parent
b60938eefd
commit
eadac47631
@ -2152,6 +2152,7 @@ fn buildOutputType(
|
||||
}
|
||||
|
||||
for (lib_dirs.items) |lib_dir_path| {
|
||||
if (cross_target.isDarwin()) break; // Targeting Darwin we let the linker resolve the libraries in the correct order
|
||||
test_path.clearRetainingCapacity();
|
||||
try test_path.writer().print("{s}" ++ sep ++ "{s}{s}{s}", .{
|
||||
lib_dir_path,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user