diff options
| author | NagaChaitanya Vellanki <pnagato@protonmail.com> | 2023-03-17 02:33:31 -0700 |
|---|---|---|
| committer | NagaChaitanya Vellanki <pnagato@protonmail.com> | 2023-03-17 02:33:31 -0700 |
| commit | 97740a648f57e24c45f641f2827598b26a2bf661 (patch) | |
| tree | 576f42531bee26c8dce0710f235e429e507c9d5a | |
| parent | 511364e7874dba9649a264100407e4bffe7b5425 (diff) | |
| download | rust-97740a648f57e24c45f641f2827598b26a2bf661.tar.gz rust-97740a648f57e24c45f641f2827598b26a2bf661.zip | |
Check for llvm-tools before install
| -rw-r--r-- | src/bootstrap/install.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs index ac3843c3344..42d895a3413 100644 --- a/src/bootstrap/install.rs +++ b/src/bootstrap/install.rs @@ -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 { |
