mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
buildRustCrate: set NUM_JOBS to NIX_BUILD_CORES
Bofore this change, NUM_JOBS was set to 1. Some crates for building C/C++ code (e.g. the cc and cmake crates), rely on this variable to set the number of jobs. As a consequence, we were compiling embedded libraries serially. Change this to NIX_BUILD_CORES to permit parallel builds. Prior discussion: https://github.com/NixOS/nixpkgs/pull/50452#issuecomment-439407547
This commit is contained in:
parent
3a2e9d2ac7
commit
e87d457564
@ -144,7 +144,7 @@ in ''
|
||||
export CARGO_PKG_VERSION_PATCH=${lib.elemAt version 2}
|
||||
export CARGO_PKG_VERSION_PRE="${versionPre}"
|
||||
export CARGO_PKG_HOMEPAGE="${crateHomepage}"
|
||||
export NUM_JOBS=1
|
||||
export NUM_JOBS=$NIX_BUILD_CORES
|
||||
export RUSTC="rustc"
|
||||
export RUSTDOC="rustdoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user