@@ -39,6 +39,10 @@ pub fn install_rls(builder: &Builder, stage: u32, host: Interned<String>) {
3939 install_sh ( builder, "rls" , "rls" , stage, Some ( host) ) ;
4040}
4141
42+ pub fn install_rustfmt ( builder : & Builder , stage : u32 , host : Interned < String > ) {
43+ install_sh ( builder, "rustfmt" , "rustfmt" , stage, Some ( host) ) ;
44+ }
45+
4246pub fn install_analysis ( builder : & Builder , stage : u32 , host : Interned < String > ) {
4347 install_sh ( builder, "analysis" , "rust-analysis" , stage, Some ( host) ) ;
4448}
@@ -192,6 +196,13 @@ install!((self, builder, _config),
192196 println!( "skipping Install RLS stage{} ({})" , self . stage, self . target) ;
193197 }
194198 } ;
199+ Rustfmt , "rustfmt" , _config. extended, only_hosts: true , {
200+ if builder. ensure( dist:: Rustfmt { stage: self . stage, target: self . target } ) . is_some( ) {
201+ install_rustfmt( builder, self . stage, self . target) ;
202+ } else {
203+ println!( "skipping Install Rustfmt stage{} ({})" , self . stage, self . target) ;
204+ }
205+ } ;
195206 Analysis , "analysis" , _config. extended, only_hosts: false , {
196207 builder. ensure( dist:: Analysis {
197208 compiler: builder. compiler( self . stage, self . host) ,
0 commit comments