diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index b62c9a906b79..c10b82536467 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -1581,6 +1581,10 @@ impl Builder<'_> { /// `host`. pub fn tool_cmd(&self, tool: Tool) -> BootstrapCommand { let mut cmd = command(self.tool_exe(tool)); + + // Do not cache tool invocations, as they can have side effects + cmd.do_not_cache(); + let compiler = self.compiler(0, self.config.host_target); let host = &compiler.host; // Prepares the `cmd` provided to be able to run the `compiler` provided.