@@ -48,6 +48,11 @@ pub fn tmpdir(build: &Build) -> PathBuf {
48
48
/// Slurps up documentation from the `stage`'s `host`.
49
49
pub fn docs ( build : & Build , stage : u32 , host : & str ) {
50
50
println ! ( "Dist docs stage{} ({})" , stage, host) ;
51
+ if !build. config . docs {
52
+ println ! ( "\t skipping - docs disabled" ) ;
53
+ return
54
+ }
55
+
51
56
let name = format ! ( "rust-docs-{}" , package_vers( build) ) ;
52
57
let image = tmpdir ( build) . join ( format ! ( "{}-{}-image" , name, name) ) ;
53
58
let _ = fs:: remove_dir_all ( & image) ;
@@ -260,6 +265,14 @@ pub fn debugger_scripts(build: &Build,
260
265
pub fn std ( build : & Build , compiler : & Compiler , target : & str ) {
261
266
println ! ( "Dist std stage{} ({} -> {})" , compiler. stage, compiler. host,
262
267
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
+
263
276
let name = format ! ( "rust-std-{}" , package_vers( build) ) ;
264
277
let image = tmpdir ( build) . join ( format ! ( "{}-{}-image" , name, target) ) ;
265
278
let _ = fs:: remove_dir_all ( & image) ;
@@ -294,10 +307,15 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
294
307
println ! ( "Dist analysis" ) ;
295
308
296
309
if build. config . channel != "nightly" {
297
- println ! ( "Skipping dist-analysis - not on nightly channel" ) ;
310
+ println ! ( "\t skipping - not on nightly channel" ) ;
298
311
return ;
299
312
}
313
+ if compiler. host != build. config . build {
314
+ println ! ( "\t skipping - not a build host" ) ;
315
+ return
316
+ }
300
317
if compiler. stage != 2 {
318
+ println ! ( "\t skipping - not stage2" ) ;
301
319
return
302
320
}
303
321
@@ -324,13 +342,6 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
324
342
. arg ( "--legacy-manifest-dirs=rustlib,cargo" ) ;
325
343
build. run ( & mut cmd) ;
326
344
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) ;
334
345
}
335
346
336
347
/// Creates the `rust-src` installer component and the plain source tarball
0 commit comments