Skip to content
/ zig Public
forked from ziglang/zig

Commit

Permalink
Accept and handle -no_pie linker option.
Browse files Browse the repository at this point in the history
See ziglang#15438 for a case where it appears.
  • Loading branch information
alexrp committed Aug 1, 2024
1 parent c4fd830 commit 1012caa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,10 @@ fn buildOutputType(
}
}
provided_name = name[prefix..end];
} else if (mem.eql(u8, arg, "--pic-executable") or mem.eql(u8, arg, "-pic-executable")) {
} else if (mem.eql(u8, arg, "--pic-executable") or
mem.eql(u8, arg, "-pic-executable") or
mem.eql(u8, arg, "-no_pie"))
{
create_module.opts.pie = true;
} else if (mem.eql(u8, arg, "-rpath") or mem.eql(u8, arg, "--rpath") or mem.eql(u8, arg, "-R")) {
try create_module.rpath_list.append(arena, linker_args_it.nextOrFatal());
Expand Down

0 comments on commit 1012caa

Please sign in to comment.