| ... | @@ -758,10 +758,11 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void { | ... | @@ -758,10 +758,11 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void { |
| 758 | } | 758 | } |
| 759 | } | 759 | } |
| 760 | | 760 | |
| 761 | // Search for static libraries first, then dynamic libraries. | 761 | // Assume ld64 default: -search_paths_first |
| 762 | // TODO Respect flags such as -search_paths_first to the linker. | 762 | // Look in each directory for a dylib (tbd), and then for archive |
| | 763 | // TODO implement alternative: -search_dylibs_first |
| 763 | // TODO text-based API, or .tbd files. | 764 | // TODO text-based API, or .tbd files. |
| 764 | const exts = &[_][]const u8{ "a", "dylib" }; | 765 | const exts = &[_][]const u8{ "dylib", "a" }; |
| 765 | | 766 | |
| 766 | for (search_lib_names.items) |l_name| { | 767 | for (search_lib_names.items) |l_name| { |
| 767 | var found = false; | 768 | var found = false; |