Merge pull request #215511 from pennae/nix-lto-jobserver

This commit is contained in:
Bernardo Meurer
2023-02-10 08:40:42 -05:00
committed by GitHub
@@ -181,6 +181,10 @@ self = stdenv.mkDerivation {
];
makeFlags = [
# gcc runs multi-threaded LTO using make and does not yet detect the new fifo:/path style
# of make jobserver. until gcc adds support for this we have to instruct make to use this
# old style or LTO builds will run their linking on only one thread, which takes forever.
"--jobserver-style=pipe"
"profiledir=$(out)/etc/profile.d"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "PRECOMPILE_HEADERS=0"
++ lib.optional (stdenv.hostPlatform.isDarwin) "PRECOMPILE_HEADERS=1";