Merge pull request #192906 from OPNA2608/fix/openblas-parallelism
This commit is contained in:
commit
249821f29f
1 changed files with 6 additions and 0 deletions
|
@ -179,6 +179,8 @@ stdenv.mkDerivation rec {
|
|||
buildPackages.stdenv.cc
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = mkMakeFlagsFromConfig (config // {
|
||||
FC = "${stdenv.cc.targetPrefix}gfortran";
|
||||
CC = "${stdenv.cc.targetPrefix}${if stdenv.cc.isClang then "clang" else "cc"}";
|
||||
|
@ -196,6 +198,10 @@ stdenv.mkDerivation rec {
|
|||
NO_BINARY_MODE = if stdenv.isx86_64
|
||||
then toString (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
else stdenv.hostPlatform != stdenv.buildPlatform;
|
||||
# This disables automatic build job count detection (which honours neither enableParallelBuilding nor NIX_BUILD_CORES)
|
||||
# and uses the main make invocation's job count, falling back to 1 if no parallelism is used.
|
||||
# https://github.com/xianyi/OpenBLAS/blob/v0.3.20/getarch.c#L1781-L1792
|
||||
MAKE_NB_JOBS = 0;
|
||||
} // (lib.optionalAttrs singleThreaded {
|
||||
# As described on https://github.com/xianyi/OpenBLAS/wiki/Faq/4bded95e8dc8aadc70ce65267d1093ca7bdefc4c#multi-threaded
|
||||
USE_THREAD = false;
|
||||
|
|
Loading…
Reference in a new issue