authorgravatar for motiejus@jakstys.ltMotiejus Jakštys <motiejus@jakstys.lt> 2022-06-23 09:19:53+03:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-06-24 19:03:15+02:00
logd589047e80133c5f673a7d40dd1cfa50258dcc4f
treea4de3fb4e334261d8938cfe2f8a8a3d92ae3ab63
parent7c87f9c828282aa12fb2d77c9c6a2318d83b8dff

zld: ignore -search_paths_first

Ignore MachO-specific flag -search_paths_first, since it is the default in zld and ld64. Also see Jakub's comment[1]: Changing topic slightly, @motiejus dunno if you noticed, with this change building arm64 Zig binary fails on macos - it complains about unknown -search_paths_first flag. This one is an easy fix: we should ignore it since this is the default behaviour in both ld64 and zld. [1]: https://github.com/ziglang/zig/pull/11906#issuecomment-1163545849

1 files changed, 2 insertions(+), 0 deletions(-)

src/main.zig+2
......@@ -1475,6 +1475,8 @@ fn buildOutputType(
14751475 mem.eql(u8, linker_arg, "-static"))
14761476 {
14771477 force_static_libs = true;
1478 } else if (mem.eql(u8, linker_arg, "-search_paths_first")) {
1479 // ignore, since it's the default behavior in both ld64 and zld
14781480 } else {
14791481 try linker_args.append(linker_arg);
14801482 }