about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml3
-rw-r--r--build_system/build_backend.rs2
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