authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-01-22 21:43:51+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-01-23 23:22:38+00:00
logb46a40ff1db6c4d467925a9a0d72436cdb3a6a74
treed411c80e8ca133e9bfad226388f0cb11030d6420
parent7774287fdca1b56e12a420c446e83191c05fb468
signaturelock-open Commit is signed but in an unrecognized format.

compiler: Handle --no-eh-frame-hdr as a regular zig build-* flag too.

For some reason we accepted --eh-frame-hdr, but not --no-eh-frame-hdr, despite accepting the latter as a -Wl linker flag.

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

src/main.zig+3
......@@ -575,6 +575,7 @@ const usage_build_generic =
575575 \\ 0x[hexstring] Maximum 32 bytes
576576 \\ none (default) Disable build-id
577577 \\ --eh-frame-hdr Enable C++ exception handling by passing --eh-frame-hdr to linker
578 \\ --no-eh-frame-hdr Disable C++ exception handling by passing --no-eh-frame-hdr to linker
578579 \\ --emit-relocs Enable output of relocation sections for post build tools
579580 \\ -z [arg] Set linker extension flags
580581 \\ nodelete Indicate that the object cannot be deleted from a process
......@@ -1582,6 +1583,8 @@ fn buildOutputType(
15821583 fatal("unable to parse '{s}': {s}", .{ arg, @errorName(err) });
15831584 } else if (mem.eql(u8, arg, "--eh-frame-hdr")) {
15841585 link_eh_frame_hdr = true;
1586 } else if (mem.eql(u8, arg, "--no-eh-frame-hdr")) {
1587 link_eh_frame_hdr = false;
15851588 } else if (mem.eql(u8, arg, "--dynamicbase")) {
15861589 linker_dynamicbase = true;
15871590 } else if (mem.eql(u8, arg, "--no-dynamicbase")) {