Merge pull request #177567 from OPNA2608/fix/palemoon-threads_flakiness

palemoon: Limit build cores count
This commit is contained in:
Anderson Torres 2022-06-13 22:05:08 -03:00 committed by GitHub
commit 29d09efbd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,6 +113,13 @@ stdenv.mkDerivation rec {
configurePhase = ''
runHook preConfigure
# Too many cores can lead to build flakiness
# https://forum.palemoon.org/viewtopic.php?f=5&t=28480
export jobs=$(($NIX_BUILD_CORES<=32 ? $NIX_BUILD_CORES : 32))
if [ -z "$enableParallelBuilding" ]; then
jobs=1
fi
export MOZCONFIG=$PWD/mozconfig
export MOZ_NOSPAM=1
@ -120,7 +127,7 @@ stdenv.mkDerivation rec {
export gtkversion=${if withGTK3 then "3" else "2"}
export xlibs=${lib.makeLibraryPath [ xorg.libX11 ]}
export prefix=$out
export mozmakeflags="-j${if enableParallelBuilding then "$NIX_BUILD_CORES" else "1"}"
export mozmakeflags="-j$jobs"
export autoconf=${autoconf213}/bin/autoconf
substituteAll ${./mozconfig} $MOZCONFIG