cpython: restrict enableLTO to Linux

Both darwin platforms would fail:
  https://hydra.nixos.org/build/147600631
  https://hydra.nixos.org/build/147646604
And as it seems to be a risky feature, I switched other platforms along
(though none are on the official build farm)
This commit is contained in:
Vladimír Čunát 2021-07-16 10:14:56 +02:00
parent fac5757eec
commit 1f2b1f3bb0
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -44,7 +44,8 @@
, enableNoSemanticInterposition ? (!stdenv.cc.isClang || (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "10"))
# enableLTO is a subset of the enableOptimizations flag that doesn't harm reproducibility.
# enabling LTO on 32bit arch causes downstream packages to fail when linking
, enableLTO ? stdenv.is64bit
# enabling LTO on *-darwin causes python3 to fail when linking.
, enableLTO ? stdenv.is64bit && stdenv.isLinux
, reproducibleBuild ? true
, pythonAttr ? "python${sourceVersion.major}${sourceVersion.minor}"
}: