Skip to content

Commit

Permalink
zld: ignore -search_paths_first
Browse files Browse the repository at this point in the history
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]: ziglang#11906 (comment)
  • Loading branch information
motiejus authored and wooster0 committed Jul 24, 2022
1 parent eae5253 commit 806e543
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,8 @@ fn buildOutputType(
mem.eql(u8, linker_arg, "-static"))
{
force_static_libs = true;
} else if (mem.eql(u8, linker_arg, "-search_paths_first")) {
// ignore, since it's the default behavior in both ld64 and zld
} else {
try linker_args.append(linker_arg);
}
Expand Down

0 comments on commit 806e543

Please sign in to comment.