Skip to content

Commit 24c7340

Browse files
committed
rustbuild: fix dist-analysis with full bootstrap disabled
1 parent 7b659cf commit 24c7340

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/bootstrap/dist.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,18 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
320320
return
321321
}
322322

323+
// Package save-analysis from stage1 if not doing a full bootstrap, as the
324+
// stage2 artifacts is simply copied from stage1 in that case.
325+
let compiler = if build.force_use_stage1(compiler, target) {
326+
Compiler::new(1, compiler.host)
327+
} else {
328+
compiler.clone()
329+
};
330+
323331
let name = format!("rust-analysis-{}", package_vers(build));
324332
let image = tmpdir(build).join(format!("{}-{}-image", name, target));
325333

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

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

0 commit comments

Comments
 (0)