buildRustCrate: use $NIX_BUILD_CORES for each of the crates
This commit is contained in:
parent
c18bb57627
commit
4c89619152
@ -11,7 +11,7 @@
|
||||
rustcOpts =
|
||||
lib.lists.foldl' (opts: opt: opts + " " + opt)
|
||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
||||
(["-C codegen-units=1"] ++ extraRustcOpts);
|
||||
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
|
||||
rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
|
||||
|
||||
# Some platforms have different names for rustc.
|
||||
|
@ -22,7 +22,7 @@ let version_ = lib.splitString "-" crateVersion;
|
||||
version = lib.splitString "." (lib.head version_);
|
||||
rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt)
|
||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
||||
(["-C codegen-units=1"] ++ extraRustcOpts);
|
||||
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
|
||||
buildDeps = makeDeps buildDependencies;
|
||||
authors = lib.concatStringsSep ":" crateAuthors;
|
||||
optLevel = if release then 3 else 0;
|
||||
|
Loading…
Reference in New Issue
Block a user