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 7, 2024
1 parent bf41a00 commit cd39e58
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 @@ -1981,7 +1981,10 @@ fn buildOutputType(
needed = false;
} else if (mem.eql(u8, linker_arg, "--no-as-needed")) {
needed = true;
} else if (mem.eql(u8, linker_arg, "--no-pie") or mem.eql(u8, linker_arg, "-no-pie")) {
} else if (mem.eql(u8, linker_arg, "--no-pie") or
mem.eql(u8, linker_arg, "-no-pie") or
mem.eql(u8, linker_arg, "-no_pie"))
{
create_module.opts.pie = false;
} else if (mem.eql(u8, linker_arg, "--sort-common")) {
// from ld.lld(1): --sort-common is ignored for GNU compatibility,
Expand Down

0 comments on commit cd39e58

Please sign in to comment.