diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-24 22:02:15 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-24 22:02:19 +0200 |
| commit | eadac4763135717ace3a7809ec5d6413b1699fcd (patch) | |
| tree | ab7faff3a1d789c71dd7d50efae65ba41fdecaf3 /src/main.zig | |
| parent | b60938eefd533ccf22675e41c22ffd57bc5d5be1 (diff) | |
| download | zig-eadac4763135717ace3a7809ec5d6413b1699fcd.tar.gz zig-eadac4763135717ace3a7809ec5d6413b1699fcd.zip | |
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.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index 9cf50e1193..3d65875975 100644 --- a/src/main.zig +++ b/src/main.zig @@ -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, |
