darwin.stdenv: fix scons Python override

This reduces the number of Python builds in the bootstrap to two: a minimal build and a normal build. Both have LTO disabled, which is required due to missing LLVM LTO libraries. This is necessary to correctly enable LTO builds in Python because it needs `llvm-ar` from `stdenv.cc.cc.libllvm`, which does not exist in the bootstrap.
This commit is contained in:
Randy Eckenrode 2024-07-20 21:32:38 -04:00
parent be3262bae8
commit 312e20a312
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9

View File

@ -547,6 +547,8 @@ in
buildInputs = old.buildInputs or [ ] ++ [ self.darwin.CF ];
});
scons = super.scons.override { python3Packages = self.python3Minimal.pkgs; };
darwin = super.darwin.overrideScope (selfDarwin: superDarwin: {
apple_sdk = superDarwin.apple_sdk // {
inherit (prevStage.darwin.apple_sdk) sdkRoot;