Auto merge of #38353 - alexcrichton:fix-nightiles, r=alexcrichton
Another round of nightly fixes Another three separate errors happened last night: * Race condition in save analysis failed the OX build * Packaging docs that don't exist failed the Android build * Packaging save-analysis that doesn't exist failed the cross host builds It just never ends...
This commit is contained in:
commit
2ac7121672
2 changed files with 21 additions and 3 deletions
|
@ -48,6 +48,11 @@ pub fn tmpdir(build: &Build) -> PathBuf {
|
|||
/// Slurps up documentation from the `stage`'s `host`.
|
||||
pub fn docs(build: &Build, stage: u32, host: &str) {
|
||||
println!("Dist docs stage{} ({})", stage, host);
|
||||
if !build.config.docs {
|
||||
println!("\tskipping - docs disabled");
|
||||
return
|
||||
}
|
||||
|
||||
let name = format!("rust-docs-{}", package_vers(build));
|
||||
let image = tmpdir(build).join(format!("{}-{}-image", name, name));
|
||||
let _ = fs::remove_dir_all(&image);
|
||||
|
@ -260,6 +265,14 @@ pub fn debugger_scripts(build: &Build,
|
|||
pub fn std(build: &Build, compiler: &Compiler, target: &str) {
|
||||
println!("Dist std stage{} ({} -> {})", compiler.stage, compiler.host,
|
||||
target);
|
||||
|
||||
// The only true set of target libraries came from the build triple, so
|
||||
// let's reduce redundant work by only producing archives from that host.
|
||||
if compiler.host != build.config.build {
|
||||
println!("\tskipping, not a build host");
|
||||
return
|
||||
}
|
||||
|
||||
let name = format!("rust-std-{}", package_vers(build));
|
||||
let image = tmpdir(build).join(format!("{}-{}-image", name, target));
|
||||
let _ = fs::remove_dir_all(&image);
|
||||
|
@ -294,10 +307,15 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
|
|||
println!("Dist analysis");
|
||||
|
||||
if build.config.channel != "nightly" {
|
||||
println!("Skipping dist-analysis - not on nightly channel");
|
||||
println!("\tskipping - not on nightly channel");
|
||||
return;
|
||||
}
|
||||
if compiler.host != build.config.build {
|
||||
println!("\tskipping - not a build host");
|
||||
return
|
||||
}
|
||||
if compiler.stage != 2 {
|
||||
println!("\tskipping - not stage2");
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ use rustc::session::config::CrateType::CrateTypeExecutable;
|
|||
use rustc::ty::{self, TyCtxt};
|
||||
|
||||
use std::env;
|
||||
use std::fs::{self, File};
|
||||
use std::fs::File;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use syntax::ast::{self, NodeId, PatKind, Attribute, CRATE_NODE_ID};
|
||||
|
@ -832,7 +832,7 @@ pub fn process_crate<'l, 'tcx>(tcx: TyCtxt<'l, 'tcx, 'tcx>,
|
|||
},
|
||||
};
|
||||
|
||||
if let Err(e) = fs::create_dir_all(&root_path) {
|
||||
if let Err(e) = rustc::util::fs::create_dir_racy(&root_path) {
|
||||
tcx.sess.err(&format!("Could not create directory {}: {}",
|
||||
root_path.display(),
|
||||
e));
|
||||
|
|
Loading…
Add table
Reference in a new issue