Skip to content

Commit 8385fc0

Browse files
committed
Auto merge of #46025 - nrc:rustfmt-fix, r=Mark-Simulacrum
Fix a bug where the rustfmt tarball was not being produced r? @alexcrichton This makes rustfmt a dep of 'extended', which seems to be necessary for the rustfmt dist step to actually get run.
2 parents 42ea30c + 262029e commit 8385fc0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bootstrap/dist.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1159,8 +1159,6 @@ impl Step for Rustfmt {
11591159
t!(fs::create_dir_all(&image));
11601160

11611161
// Prepare the image directory
1162-
// We expect RLS to build, because we've exited this step above if tool
1163-
// state for RLS isn't testing.
11641162
let rustfmt = builder.ensure(tool::Rustfmt {
11651163
compiler: builder.compiler(stage, build.build),
11661164
target
@@ -1262,6 +1260,7 @@ impl Step for Extended {
12621260
compiler: builder.compiler(stage, target),
12631261
});
12641262
let cargo_installer = builder.ensure(Cargo { stage, target });
1263+
let rustfmt_installer = builder.ensure(Rustfmt { stage, target });
12651264
let rls_installer = builder.ensure(Rls { stage, target });
12661265
let mingw_installer = builder.ensure(Mingw { host: target });
12671266
let analysis_installer = builder.ensure(Analysis {
@@ -1299,6 +1298,7 @@ impl Step for Extended {
12991298
tarballs.push(rustc_installer);
13001299
tarballs.push(cargo_installer);
13011300
tarballs.extend(rls_installer.clone());
1301+
tarballs.extend(rustfmt_installer.clone());
13021302
tarballs.push(analysis_installer);
13031303
tarballs.push(std_installer);
13041304
if build.config.docs {
@@ -1366,6 +1366,9 @@ impl Step for Extended {
13661366
if rls_installer.is_none() {
13671367
contents = filter(&contents, "rls");
13681368
}
1369+
if rustfmt_installer.is_none() {
1370+
contents = filter(&contents, "rustfmt");
1371+
}
13691372
let ret = tmp.join(p.file_name().unwrap());
13701373
t!(t!(File::create(&ret)).write_all(contents.as_bytes()));
13711374
return ret

0 commit comments

Comments
 (0)