tree-wide: enable LTO on Darwin
This commit is contained in:
@@ -70,8 +70,7 @@
|
||||
, enableNoSemanticInterposition ? true
|
||||
|
||||
# enabling LTO on 32bit arch causes downstream packages to fail when linking
|
||||
# enabling LTO on *-darwin causes python3 to fail when linking.
|
||||
, enableLTO ? stdenv.is64bit && stdenv.isLinux
|
||||
, enableLTO ? stdenv.isDarwin || (stdenv.is64bit && stdenv.isLinux)
|
||||
|
||||
# enable asserts to ensure the build remains reproducible
|
||||
, reproducibleBuild ? false
|
||||
@@ -159,7 +158,7 @@ let
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
buildPackages.stdenv.cc
|
||||
pythonOnBuildForHost
|
||||
] ++ optionals (stdenv.cc.isClang && (!stdenv.hostPlatform.useAndroidPrebuilt or false) && (enableLTO || enableOptimizations)) [
|
||||
] ++ optionals (stdenv.cc.isClang && !stdenv.isDarwin && (!stdenv.hostPlatform.useAndroidPrebuilt or false) && (enableLTO || enableOptimizations)) [
|
||||
stdenv.cc.cc.libllvm.out
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user