nixComponents: gate GCC flags on Nix 2.32+

This is based on advice from @xokdvium on Matrix.
This commit is contained in:
Philip Taron
2025-10-07 14:49:58 -07:00
parent c1e3ab069c
commit 8f277e1537
@@ -154,7 +154,10 @@ let
};
mesonLibraryLayer = finalAttrs: prevAttrs: {
preConfigure =
# See https://github.com/NixOS/nix/pull/14105 -- enabling this only for Nix 2.32+ as there are
# reports of undefined behavior on previous versions. Note that this does //not// use
# `finalAttrs.version` in order to avoid infinite recursion.
${if lib.versionOlder version "2.32" then null else "preConfigure"} =
let
interpositionFlags = [
"-fno-semantic-interposition"