···4545# enableLTO is a subset of the enableOptimizations flag that doesn't harm reproducibility.
4646# enabling LTO on 32bit arch causes downstream packages to fail when linking
4747# enabling LTO on *-darwin causes python3 to fail when linking.
4848-, enableLTO ? stdenv.is64bit && stdenv.isLinux
4949-, reproducibleBuild ? false
5048# enabling LTO with musl and dynamic linking fails with a linker error although it should
5149# be possible as alpine is doing it: https://github.com/alpinelinux/aports/blob/a8ccb04668c7729e0f0db6c6ff5f25d7519e779b/main/python3/APKBUILD#L82
5250, enableLTO ? stdenv.is64bit && stdenv.isLinux && !(stdenv.hostPlatform.isMusl && !stdenv.hostPlatform.isStatic)