From a93c24f9ecb571cc0954e1c708f9dcf9779f84ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Wed, 5 Aug 2026 20:14:55 +0200 Subject: [PATCH] Temporarily fix the `serde` 4 threads benchmark --- collector/src/compile/execute/mod.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/collector/src/compile/execute/mod.rs b/collector/src/compile/execute/mod.rs index 825a7dcff..971a806e7 100644 --- a/collector/src/compile/execute/mod.rs +++ b/collector/src/compile/execute/mod.rs @@ -417,12 +417,15 @@ impl<'a> CargoProcess<'a> { let mut cmd = self.base_command(self.cwd, cargo_subcommand); cmd.arg("-p").arg(self.get_pkgid(self.cwd)?); - // Whatever arguments were passed from the external environment, we only look - // at the config value - cmd.env( - "RUSTC_THREAD_COUNT", - self.frontend_threads.get().to_string(), - ); + + // FIXME: this is a hotfix for the -threads4 benchmark(s), until we finish support for + // parallel frontend benchmarks fully. + if !self.rustc_args.iter().any(|arg| arg.contains("-Zthreads")) { + cmd.env( + "RUSTC_THREAD_COUNT", + self.frontend_threads.get().to_string(), + ); + } match self.profile { Profile::Check => { cmd.arg("--profile").arg("check");