mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
build-rust-crate: disable incremental builds
This commit is contained in:
parent
18165d6411
commit
ff5ff66ef3
@ -9,12 +9,14 @@
|
||||
|
||||
let
|
||||
baseRustcOpts =
|
||||
[(if release then "-C opt-level=3" else "-C debuginfo=2")]
|
||||
++ ["-C codegen-units=$NIX_BUILD_CORES"]
|
||||
++ ["--remap-path-prefix=$NIX_BUILD_TOP=/" ]
|
||||
++ [(mkRustcDepArgs dependencies crateRenames)]
|
||||
++ [(mkRustcFeatureArgs crateFeatures)]
|
||||
++ extraRustcOpts
|
||||
[
|
||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
||||
"-C codegen-units=$NIX_BUILD_CORES"
|
||||
"-C incremental=no"
|
||||
"--remap-path-prefix=$NIX_BUILD_TOP=/"
|
||||
(mkRustcDepArgs dependencies crateRenames)
|
||||
(mkRustcFeatureArgs crateFeatures)
|
||||
] ++ extraRustcOpts
|
||||
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--target ${rust.toRustTargetSpec stdenv.hostPlatform} -C linker=${stdenv.hostPlatform.config}-gcc"
|
||||
# since rustc 1.42 the "proc_macro" crate is part of the default crate prelude
|
||||
# https://github.com/rust-lang/cargo/commit/4d64eb99a4#diff-7f98585dbf9d30aa100c8318e2c77e79R1021-R1022
|
||||
|
@ -24,7 +24,7 @@ let version_ = lib.splitString "-" crateVersion;
|
||||
version = lib.splitVersion (lib.head version_);
|
||||
rustcOpts = lib.foldl' (opts: opt: opts + " " + opt)
|
||||
(if release then "-C opt-level=3" else "-C debuginfo=2")
|
||||
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
|
||||
(["-C codegen-units=$NIX_BUILD_CORES -C incremental=no"] ++ extraRustcOpts);
|
||||
buildDeps = mkRustcDepArgs buildDependencies crateRenames;
|
||||
authors = lib.concatStringsSep ":" crateAuthors;
|
||||
optLevel = if release then 3 else 0;
|
||||
|
Loading…
Reference in New Issue
Block a user