Skip to content

Commit

Permalink
Auto merge of #38765 - xen0n:i-dont-like-red-bots-2, r=alexcrichton
Browse files Browse the repository at this point in the history
rustbuild: fix dist-analysis with full bootstrap disabled

Really fixes #38734, per discussion in #38752 which was solving the underlying problem the wrong way.

This just mirrors the [similar logic] in documentation building as suggested, that just takes the stage1 compiler artifacts instead in case of non-full-bootstrap builds. Actually copying the artifacts around seems to be unnecessary.

r? @alexcrichton

[similar logic]: https://github.com/rust-lang/rust/blob/7b659cfdbce094a790dbb246da2681a47565782a/src/bootstrap/doc.rs#L140-L144
  • Loading branch information
bors committed Jan 1, 2017
2 parents 4947ada + 24c7340 commit 917e5ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,18 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
return
}

// Package save-analysis from stage1 if not doing a full bootstrap, as the
// stage2 artifacts is simply copied from stage1 in that case.
let compiler = if build.force_use_stage1(compiler, target) {
Compiler::new(1, compiler.host)
} else {
compiler.clone()
};

let name = format!("rust-analysis-{}", package_vers(build));
let image = tmpdir(build).join(format!("{}-{}-image", name, target));

let src = build.stage_out(compiler, Mode::Libstd).join(target).join("release").join("deps");
let src = build.stage_out(&compiler, Mode::Libstd).join(target).join("release").join("deps");

let image_src = src.join("save-analysis");
let dst = image.join("lib/rustlib").join(target).join("analysis");
Expand Down

0 comments on commit 917e5ba

Please sign in to comment.