mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
97bf56b78d ("lix: link with -z,noexecstack") sets NIX_LDFLAGS to
"-z,noexecstack" on every platform. cc-wrapper prefixes each word of
NIX_LDFLAGS with -Wl, so clang hands `-z noexecstack` to the linker, and
Apple's ld64 has no -z option. Meson's compiler sanity check then fails
to link, and every Lix in lixPackageSets fails to build on
aarch64-darwin: https://hydra.nixos.org/build/347153371
Mach-O does not need the flag: ld64 leaves stacks non-executable unless
-allow_stack_execute is passed. lib.optionalString keeps the value
unchanged on ELF platforms, so no Linux derivation changes.
Assisted-by: Claude Code (Claude Opus 5.5)