mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 18:24:53 +00:00
Cygwin is the first platform to select `useGccNG`, and it is the natural
one: its libc is partly C++, so building `newlib-cygwin` needs C++ headers
before any libc exists. The monolithic compiler handles that with a
Cygwin-specific `langCC = stdenv.targetPlatform.isCygwin`; the split set
has a stage that provides them, `libstdcxx-no-libc`, which the preceding
commits add and wire in.
Derived from the platform rather than set on the example spec, so it holds
for any Cygwin triple, alongside the `useLLVM` rule it sits under. The
comment saying no platform selects it is retired here, since that is what
this changes.
This changes what `pkgsCross.x86_64-cygwin` builds with for everyone, not
only for callers passing the flag. Verified by building
`gccNGPackages.{libgcc,libstdcxx,libstdcxx-no-libc}` and `stdenv.cc` with
no `useGccNG` in the invocation; the derivations come out identical to
those built with the flag passed explicitly.
Assisted-by: Claude Code (Claude Opus 5)