Check for llvm-tools before install

This commit is contained in:
NagaChaitanya Vellanki 2023-03-17 02:33:31 -07:00
parent 511364e787
commit 97740a648f

View File

@ -210,10 +210,13 @@ install!((self, builder, _config),
}
};
LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, {
let tarball = builder
.ensure(dist::LlvmTools { target: self.target })
.expect("missing llvm-tools");
install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
if let Some(tarball) = builder.ensure(dist::LlvmTools { target: self.target }) {
install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
} else {
builder.info(
&format!("skipping llvm-tools stage{} ({}): external LLVM", self.compiler.stage, self.target),
);
}
};
Rustfmt, alias = "rustfmt", Self::should_build(_config), only_hosts: true, {
if let Some(tarball) = builder.ensure(dist::Rustfmt {