Merge pull request #57936 from andir/build-rust-crate-nix-build-cores
buildRustCrate: use $NIX_BUILD_CORES for each of the crates
This commit is contained in:
commit
e0b4356c0d
@ -11,7 +11,7 @@
|
|||||||
rustcOpts =
|
rustcOpts =
|
||||||
lib.lists.foldl' (opts: opt: opts + " " + opt)
|
lib.lists.foldl' (opts: opt: opts + " " + opt)
|
||||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
(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}";
|
rustcMeta = "-C metadata=${metadata} -C extra-filename=-${metadata}";
|
||||||
|
|
||||||
# Some platforms have different names for rustc.
|
# Some platforms have different names for rustc.
|
||||||
|
@ -22,7 +22,7 @@ let version_ = lib.splitString "-" crateVersion;
|
|||||||
version = lib.splitString "." (lib.head version_);
|
version = lib.splitString "." (lib.head version_);
|
||||||
rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt)
|
rustcOpts = lib.lists.foldl' (opts: opt: opts + " " + opt)
|
||||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
(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;
|
buildDeps = makeDeps buildDependencies;
|
||||||
authors = lib.concatStringsSep ":" crateAuthors;
|
authors = lib.concatStringsSep ":" crateAuthors;
|
||||||
optLevel = if release then 3 else 0;
|
optLevel = if release then 3 else 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user