Rollup merge of #109256 - chaitanyav:fix_108948, r=albertlarsan68

Check for llvm-tools before install

Fixes #108948
````@jpalus```` Please review
This commit is contained in:
Matthias Krüger 2023-03-18 00:05:55 +01:00 committed by GitHub
commit 01edab6024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {