Skip to content

Commit 8f3844f

Browse files
committed
refactor adding rustc and std into extended builds
1 parent 8df945c commit 8f3844f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/bootstrap/dist.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,15 @@ impl Step for Extended {
13451345

13461346
builder.info(&format!("Dist extended stage{} ({})", compiler.stage, target));
13471347

1348-
let rustc_installer = builder.ensure(Rustc { compiler: builder.compiler(stage, target) });
1348+
let mut tarballs = Vec::new();
1349+
1350+
// When rust-std package split from rustc, we needed to ensure that during
1351+
// upgrades rustc was upgraded before rust-std. To avoid rustc clobbering
1352+
// the std files during uninstall. To do this ensure that rustc comes
1353+
// before rust-std in the list below.
1354+
tarballs.push(builder.ensure(Rustc { compiler: builder.compiler(stage, target) }));
1355+
tarballs.push(builder.ensure(Std { compiler, target }).expect("missing std"));
1356+
13491357
let cargo_installer = builder.ensure(Cargo { compiler, target });
13501358
let rustfmt_installer = builder.ensure(Rustfmt { compiler, target });
13511359
let rust_demangler_installer = builder.ensure(RustDemangler { compiler, target });
@@ -1358,7 +1366,6 @@ impl Step for Extended {
13581366
let analysis_installer = builder.ensure(Analysis { compiler, target });
13591367

13601368
let docs_installer = builder.ensure(Docs { host: target });
1361-
let std_installer = builder.ensure(Std { compiler, target });
13621369

13631370
let etc = builder.src.join("src/etc/installer");
13641371

@@ -1367,12 +1374,6 @@ impl Step for Extended {
13671374
return;
13681375
}
13691376

1370-
// When rust-std package split from rustc, we needed to ensure that during
1371-
// upgrades rustc was upgraded before rust-std. To avoid rustc clobbering
1372-
// the std files during uninstall. To do this ensure that rustc comes
1373-
// before rust-std in the list below.
1374-
let mut tarballs = Vec::new();
1375-
tarballs.push(rustc_installer);
13761377
tarballs.push(cargo_installer);
13771378
tarballs.push(clippy_installer);
13781379
tarballs.extend(rust_demangler_installer.clone());
@@ -1384,7 +1385,6 @@ impl Step for Extended {
13841385
if let Some(analysis_installer) = analysis_installer {
13851386
tarballs.push(analysis_installer);
13861387
}
1387-
tarballs.push(std_installer.expect("missing std"));
13881388
if let Some(docs_installer) = docs_installer {
13891389
tarballs.push(docs_installer);
13901390
}

0 commit comments

Comments
 (0)