@@ -39,6 +39,10 @@ pub fn install_rls(builder: &Builder, stage: u32, host: Interned<String>) {
39
39
install_sh ( builder, "rls" , "rls" , stage, Some ( host) ) ;
40
40
}
41
41
42
+ pub fn install_rustfmt ( builder : & Builder , stage : u32 , host : Interned < String > ) {
43
+ install_sh ( builder, "rustfmt" , "rustfmt" , stage, Some ( host) ) ;
44
+ }
45
+
42
46
pub fn install_analysis ( builder : & Builder , stage : u32 , host : Interned < String > ) {
43
47
install_sh ( builder, "analysis" , "rust-analysis" , stage, Some ( host) ) ;
44
48
}
@@ -192,6 +196,13 @@ install!((self, builder, _config),
192
196
println!( "skipping Install RLS stage{} ({})" , self . stage, self . target) ;
193
197
}
194
198
} ;
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
+ } ;
195
206
Analysis , "analysis" , _config. extended, only_hosts: false , {
196
207
builder. ensure( dist:: Analysis {
197
208
compiler: builder. compiler( self . stage, self . host) ,
0 commit comments