From c63d8f3f9634ee9dd692a13fd555ee5030984e2f Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Thu, 30 Dec 2021 13:03:32 +0100 Subject: [PATCH] Move incr comp enable to the build system --- Cargo.toml | 3 --- build_system/build_backend.rs | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7d23b60d948..3be4250296e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,9 +40,6 @@ unstable-features = ["jit", "inline_asm"] jit = ["cranelift-jit", "libloading"] inline_asm = [] -[profile.release.package.rustc_codegen_cranelift] -incremental = true - # Disable optimizations and debuginfo of build scripts and some of the heavy build deps, as the # execution time of build scripts is so fast that optimizing them slows down the total build time. [profile.release.build-override] diff --git a/build_system/build_backend.rs b/build_system/build_backend.rs index 1f7cdbebef6..41f311d307b 100644 --- a/build_system/build_backend.rs +++ b/build_system/build_backend.rs @@ -10,6 +10,8 @@ pub(crate) fn build_backend( let mut cmd = Command::new("cargo"); cmd.arg("build").arg("--target").arg(host_triple); + cmd.env("CARGO_BUILD_INCREMENTAL", "true"); // Force incr comp even in release mode + let mut rustflags = env::var("RUSTFLAGS").unwrap_or_default(); // Deny warnings on CI