@@ -48,6 +48,11 @@ pub fn tmpdir(build: &Build) -> PathBuf {
4848/// Slurps up documentation from the `stage`'s `host`.
4949pub fn docs ( build : & Build , stage : u32 , host : & str ) {
5050 println ! ( "Dist docs stage{} ({})" , stage, host) ;
51+ if !build. config . docs {
52+ println ! ( "\t skipping - docs disabled" ) ;
53+ return
54+ }
55+
5156 let name = format ! ( "rust-docs-{}" , package_vers( build) ) ;
5257 let image = tmpdir ( build) . join ( format ! ( "{}-{}-image" , name, name) ) ;
5358 let _ = fs:: remove_dir_all ( & image) ;
@@ -260,6 +265,14 @@ pub fn debugger_scripts(build: &Build,
260265pub fn std ( build : & Build , compiler : & Compiler , target : & str ) {
261266 println ! ( "Dist std stage{} ({} -> {})" , compiler. stage, compiler. host,
262267 target) ;
268+
269+ // The only true set of target libraries came from the build triple, so
270+ // let's reduce redundant work by only producing archives from that host.
271+ if compiler. host != build. config . build {
272+ println ! ( "\t skipping, not a build host" ) ;
273+ return
274+ }
275+
263276 let name = format ! ( "rust-std-{}" , package_vers( build) ) ;
264277 let image = tmpdir ( build) . join ( format ! ( "{}-{}-image" , name, target) ) ;
265278 let _ = fs:: remove_dir_all ( & image) ;
@@ -294,10 +307,15 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
294307 println ! ( "Dist analysis" ) ;
295308
296309 if build. config . channel != "nightly" {
297- println ! ( "Skipping dist-analysis - not on nightly channel" ) ;
310+ println ! ( "\t skipping - not on nightly channel" ) ;
298311 return ;
299312 }
313+ if compiler. host != build. config . build {
314+ println ! ( "\t skipping - not a build host" ) ;
315+ return
316+ }
300317 if compiler. stage != 2 {
318+ println ! ( "\t skipping - not stage2" ) ;
301319 return
302320 }
303321
@@ -324,13 +342,6 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
324342 . arg ( "--legacy-manifest-dirs=rustlib,cargo" ) ;
325343 build. run ( & mut cmd) ;
326344 t ! ( fs:: remove_dir_all( & image) ) ;
327-
328- // Create plain source tarball
329- let mut cmd = Command :: new ( "tar" ) ;
330- cmd. arg ( "-czf" ) . arg ( sanitize_sh ( & distdir ( build) . join ( & format ! ( "{}.tar.gz" , name) ) ) )
331- . arg ( "analysis" )
332- . current_dir ( & src) ;
333- build. run ( & mut cmd) ;
334345}
335346
336347/// Creates the `rust-src` installer component and the plain source tarball
0 commit comments