diff options
| author | Marc-Antoine Perennou <Marc-Antoine@Perennou.com> | 2017-11-14 09:57:56 +0100 |
|---|---|---|
| committer | Marc-Antoine Perennou <Marc-Antoine@Perennou.com> | 2017-11-16 10:47:26 +0100 |
| commit | 1930ee8b945fb2adf0efafbf3b8e9ac72c92153d (patch) | |
| tree | fcfeb8a4eb547eec31eaa32c6f9ed2f33640b9ee | |
| parent | 1410d5604042b739f02f9ec0f2a6c5125c797d52 (diff) | |
| download | rust-1930ee8b945fb2adf0efafbf3b8e9ac72c92153d.tar.gz rust-1930ee8b945fb2adf0efafbf3b8e9ac72c92153d.zip | |
rustbuild: Install rustfmt as part of extended build
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
| -rw-r--r-- | src/bootstrap/builder.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/install.rs | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 4e2898bd665..b202df76f7c 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -264,7 +264,7 @@ impl<'a> Builder<'a> { dist::Rls, dist::Rustfmt, dist::Extended, dist::HashSign, dist::DontDistWithMiriEnabled), Kind::Install => describe!(install::Docs, install::Std, install::Cargo, install::Rls, - install::Analysis, install::Src, install::Rustc), + install::Rustfmt, install::Analysis, install::Src, install::Rustc), } } diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs index c150459bee5..743f32ece99 100644 --- a/src/bootstrap/install.rs +++ b/src/bootstrap/install.rs @@ -39,6 +39,10 @@ pub fn install_rls(builder: &Builder, stage: u32, host: Interned<String>) { install_sh(builder, "rls", "rls", stage, Some(host)); } +pub fn install_rustfmt(builder: &Builder, stage: u32, host: Interned<String>) { + install_sh(builder, "rustfmt", "rustfmt", stage, Some(host)); +} + pub fn install_analysis(builder: &Builder, stage: u32, host: Interned<String>) { install_sh(builder, "analysis", "rust-analysis", stage, Some(host)); } @@ -192,6 +196,13 @@ install!((self, builder, _config), println!("skipping Install RLS stage{} ({})", self.stage, self.target); } }; + Rustfmt, "rustfmt", _config.extended, only_hosts: true, { + if builder.ensure(dist::Rustfmt { stage: self.stage, target: self.target }).is_some() { + install_rustfmt(builder, self.stage, self.target); + } else { + println!("skipping Install Rustfmt stage{} ({})", self.stage, self.target); + } + }; Analysis, "analysis", _config.extended, only_hosts: false, { builder.ensure(dist::Analysis { compiler: builder.compiler(self.stage, self.host), |
