Skip to content

Commit 97740a6

Browse files
committed
Check for llvm-tools before install
1 parent 511364e commit 97740a6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/bootstrap/install.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,13 @@ install!((self, builder, _config),
210210
}
211211
};
212212
LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, {
213-
let tarball = builder
214-
.ensure(dist::LlvmTools { target: self.target })
215-
.expect("missing llvm-tools");
216-
install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
213+
if let Some(tarball) = builder.ensure(dist::LlvmTools { target: self.target }) {
214+
install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
215+
} else {
216+
builder.info(
217+
&format!("skipping llvm-tools stage{} ({}): external LLVM", self.compiler.stage, self.target),
218+
);
219+
}
217220
};
218221
Rustfmt, alias = "rustfmt", Self::should_build(_config), only_hosts: true, {
219222
if let Some(tarball) = builder.ensure(dist::Rustfmt {

0 commit comments

Comments
 (0)