@@ -184,6 +184,7 @@ struct Builder {
184184 cargo_release : String ,
185185 rls_release : String ,
186186 rustfmt_release : String ,
187+ llvm_tools_release : String ,
187188
188189 input : PathBuf ,
189190 output : PathBuf ,
@@ -196,11 +197,13 @@ struct Builder {
196197 cargo_version : Option < String > ,
197198 rls_version : Option < String > ,
198199 rustfmt_version : Option < String > ,
200+ llvm_tools_version : Option < String > ,
199201
200202 rust_git_commit_hash : Option < String > ,
201203 cargo_git_commit_hash : Option < String > ,
202204 rls_git_commit_hash : Option < String > ,
203205 rustfmt_git_commit_hash : Option < String > ,
206+ llvm_tools_git_commit_hash : Option < String > ,
204207}
205208
206209fn main ( ) {
@@ -212,7 +215,7 @@ fn main() {
212215 let cargo_release = args. next ( ) . unwrap ( ) ;
213216 let rls_release = args. next ( ) . unwrap ( ) ;
214217 let rustfmt_release = args. next ( ) . unwrap ( ) ;
215- let _llvm_tools_vers = args. next ( ) . unwrap ( ) ; // FIXME do something with it?
218+ let llvm_tools_release = args. next ( ) . unwrap ( ) ;
216219 let s3_address = args. next ( ) . unwrap ( ) ;
217220 let mut passphrase = String :: new ( ) ;
218221 t ! ( io:: stdin( ) . read_to_string( & mut passphrase) ) ;
@@ -222,6 +225,7 @@ fn main() {
222225 cargo_release,
223226 rls_release,
224227 rustfmt_release,
228+ llvm_tools_release,
225229
226230 input,
227231 output,
@@ -234,11 +238,13 @@ fn main() {
234238 cargo_version : None ,
235239 rls_version : None ,
236240 rustfmt_version : None ,
241+ llvm_tools_version : None ,
237242
238243 rust_git_commit_hash : None ,
239244 cargo_git_commit_hash : None ,
240245 rls_git_commit_hash : None ,
241246 rustfmt_git_commit_hash : None ,
247+ llvm_tools_git_commit_hash : None ,
242248 } . build ( ) ;
243249}
244250
@@ -248,11 +254,13 @@ impl Builder {
248254 self . cargo_version = self . version ( "cargo" , "x86_64-unknown-linux-gnu" ) ;
249255 self . rls_version = self . version ( "rls" , "x86_64-unknown-linux-gnu" ) ;
250256 self . rustfmt_version = self . version ( "rustfmt" , "x86_64-unknown-linux-gnu" ) ;
257+ self . llvm_tools_version = self . version ( "llvm-tools" , "x86_64-unknown-linux-gnu" ) ;
251258
252259 self . rust_git_commit_hash = self . git_commit_hash ( "rust" , "x86_64-unknown-linux-gnu" ) ;
253260 self . cargo_git_commit_hash = self . git_commit_hash ( "cargo" , "x86_64-unknown-linux-gnu" ) ;
254261 self . rls_git_commit_hash = self . git_commit_hash ( "rls" , "x86_64-unknown-linux-gnu" ) ;
255262 self . rustfmt_git_commit_hash = self . git_commit_hash ( "rustfmt" , "x86_64-unknown-linux-gnu" ) ;
263+ self . llvm_tools_git_commit_hash = self . git_commit_hash ( "llvm-tools" , "x86_64-unknown-linux-gnu" ) ;
256264
257265 self . digest_and_sign ( ) ;
258266 let manifest = self . build_manifest ( ) ;
@@ -289,9 +297,11 @@ impl Builder {
289297 self . package ( "rls-preview" , & mut manifest. pkg , HOSTS ) ;
290298 self . package ( "rustfmt-preview" , & mut manifest. pkg , HOSTS ) ;
291299 self . package ( "rust-analysis" , & mut manifest. pkg , TARGETS ) ;
300+ self . package ( "llvm-tools" , & mut manifest. pkg , TARGETS ) ;
292301
293302 let rls_present = manifest. pkg . contains_key ( "rls-preview" ) ;
294303 let rustfmt_present = manifest. pkg . contains_key ( "rustfmt-preview" ) ;
304+ let llvm_tools_present = manifest. pkg . contains_key ( "llvm-tools" ) ;
295305
296306 if rls_present {
297307 manifest. renames . insert ( "rls" . to_owned ( ) , Rename { to : "rls-preview" . to_owned ( ) } ) ;
@@ -346,6 +356,12 @@ impl Builder {
346356 target : host. to_string ( ) ,
347357 } ) ;
348358 }
359+ if llvm_tools_present {
360+ extensions. push ( Component {
361+ pkg : "llvm-tools" . to_string ( ) ,
362+ target : host. to_string ( ) ,
363+ } ) ;
364+ }
349365 extensions. push ( Component {
350366 pkg : "rust-analysis" . to_string ( ) ,
351367 target : host. to_string ( ) ,
@@ -455,6 +471,8 @@ impl Builder {
455471 format ! ( "rls-{}-{}.tar.gz" , self . rls_release, target)
456472 } else if component == "rustfmt" || component == "rustfmt-preview" {
457473 format ! ( "rustfmt-{}-{}.tar.gz" , self . rustfmt_release, target)
474+ } else if component == "llvm_tools" {
475+ format ! ( "llvm-tools-{}-{}.tar.gz" , self . llvm_tools_release, target)
458476 } else {
459477 format ! ( "{}-{}-{}.tar.gz" , component, self . rust_release, target)
460478 }
@@ -467,6 +485,8 @@ impl Builder {
467485 & self . rls_version
468486 } else if component == "rustfmt" || component == "rustfmt-preview" {
469487 & self . rustfmt_version
488+ } else if component == "llvm-tools" {
489+ & self . llvm_tools_version
470490 } else {
471491 & self . rust_version
472492 }
@@ -479,6 +499,8 @@ impl Builder {
479499 & self . rls_git_commit_hash
480500 } else if component == "rustfmt" || component == "rustfmt-preview" {
481501 & self . rustfmt_git_commit_hash
502+ } else if component == "llvm-tools" {
503+ & self . llvm_tools_git_commit_hash
482504 } else {
483505 & self . rust_git_commit_hash
484506 }
0 commit comments