Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions collector/src/compile/execute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading