@@ -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,14 @@ 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" ,
264+ "x86_64-unknown-linux-gnu" ) ;
256265
257266 self . digest_and_sign ( ) ;
258267 let manifest = self . build_manifest ( ) ;
@@ -289,9 +298,11 @@ impl Builder {
289298 self . package ( "rls-preview" , & mut manifest. pkg , HOSTS ) ;
290299 self . package ( "rustfmt-preview" , & mut manifest. pkg , HOSTS ) ;
291300 self . package ( "rust-analysis" , & mut manifest. pkg , TARGETS ) ;
301+ self . package ( "llvm-tools" , & mut manifest. pkg , TARGETS ) ;
292302
293303 let rls_present = manifest. pkg . contains_key ( "rls-preview" ) ;
294304 let rustfmt_present = manifest. pkg . contains_key ( "rustfmt-preview" ) ;
305+ let llvm_tools_present = manifest. pkg . contains_key ( "llvm-tools" ) ;
295306
296307 if rls_present {
297308 manifest. renames . insert ( "rls" . to_owned ( ) , Rename { to : "rls-preview" . to_owned ( ) } ) ;
@@ -346,6 +357,12 @@ impl Builder {
346357 target : host. to_string ( ) ,
347358 } ) ;
348359 }
360+ if llvm_tools_present {
361+ extensions. push ( Component {
362+ pkg : "llvm-tools" . to_string ( ) ,
363+ target : host. to_string ( ) ,
364+ } ) ;
365+ }
349366 extensions. push ( Component {
350367 pkg : "rust-analysis" . to_string ( ) ,
351368 target : host. to_string ( ) ,
@@ -455,6 +472,8 @@ impl Builder {
455472 format ! ( "rls-{}-{}.tar.gz" , self . rls_release, target)
456473 } else if component == "rustfmt" || component == "rustfmt-preview" {
457474 format ! ( "rustfmt-{}-{}.tar.gz" , self . rustfmt_release, target)
475+ } else if component == "llvm_tools" {
476+ format ! ( "llvm-tools-{}-{}.tar.gz" , self . llvm_tools_release, target)
458477 } else {
459478 format ! ( "{}-{}-{}.tar.gz" , component, self . rust_release, target)
460479 }
@@ -467,6 +486,8 @@ impl Builder {
467486 & self . rls_version
468487 } else if component == "rustfmt" || component == "rustfmt-preview" {
469488 & self . rustfmt_version
489+ } else if component == "llvm-tools" {
490+ & self . llvm_tools_version
470491 } else {
471492 & self . rust_version
472493 }
@@ -479,6 +500,8 @@ impl Builder {
479500 & self . rls_git_commit_hash
480501 } else if component == "rustfmt" || component == "rustfmt-preview" {
481502 & self . rustfmt_git_commit_hash
503+ } else if component == "llvm-tools" {
504+ & self . llvm_tools_git_commit_hash
482505 } else {
483506 & self . rust_git_commit_hash
484507 }
0 commit comments