Skip to content

Commit f5631d9

Browse files
committed
Auto merge of #49337 - kennytm:rollup, r=kennytm
Rollup of 21 pull requests - Successful merges: #49046, #49076, #49089, #49120, #49121, #49122, #49162, #49193, #49194, #49203, #49229, #49235, #49254, #49268, #49273, #49274, #49290, #49312, #49314, #49318, #49299
2 parents b4aa80d + 297a6e5 commit f5631d9

File tree

146 files changed

+1010
-2529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1010
-2529
lines changed

config.toml.example

+3
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@
271271
# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
272272
#backtrace = true
273273

274+
# Build rustc with experimental parallelization
275+
#experimental-parallel-queries = false
276+
274277
# The default linker that will be hard-coded into the generated compiler for
275278
# targets that don't specify linker explicitly in their target specifications.
276279
# Note that this is not the linker used to link said compiler.

src/Cargo.lock

+12-102
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/builder.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,13 @@ impl<'a> Builder<'a> {
321321
test::RunMake),
322322
Kind::Bench => describe!(test::Crate, test::CrateLibrustc),
323323
Kind::Doc => describe!(doc::UnstableBook, doc::UnstableBookGen, doc::TheBook,
324-
doc::Standalone, doc::Std, doc::Test, doc::Rustc, doc::ErrorIndex, doc::Nomicon,
325-
doc::Reference, doc::Rustdoc, doc::RustByExample, doc::CargoBook),
326-
Kind::Dist => describe!(dist::Docs, dist::Mingw, dist::Rustc, dist::DebuggerScripts,
327-
dist::Std, dist::Analysis, dist::Src, dist::PlainSourceTarball, dist::Cargo,
328-
dist::Rls, dist::Rustfmt, dist::Extended, dist::HashSign),
324+
doc::Standalone, doc::Std, doc::Test, doc::WhitelistedRustc, doc::Rustc,
325+
doc::ErrorIndex, doc::Nomicon, doc::Reference, doc::Rustdoc, doc::RustByExample,
326+
doc::CargoBook),
327+
Kind::Dist => describe!(dist::Docs, dist::RustcDocs, dist::Mingw, dist::Rustc,
328+
dist::DebuggerScripts, dist::Std, dist::Analysis, dist::Src,
329+
dist::PlainSourceTarball, dist::Cargo, dist::Rls, dist::Rustfmt, dist::Extended,
330+
dist::HashSign),
329331
Kind::Install => describe!(install::Docs, install::Std, install::Cargo, install::Rls,
330332
install::Rustfmt, install::Analysis, install::Src, install::Rustc),
331333
}

src/bootstrap/check.rs

+12-8
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,18 @@ impl Step for Std {
4040
let target = self.target;
4141
let compiler = builder.compiler(0, build.build);
4242

43-
let _folder = build.fold_output(|| format!("stage{}-std", compiler.stage));
44-
println!("Checking std artifacts ({} -> {})", &compiler.host, target);
45-
4643
let out_dir = build.stage_out(compiler, Mode::Libstd);
4744
build.clear_if_dirty(&out_dir, &builder.rustc(compiler));
4845
let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "check");
4946
std_cargo(builder, &compiler, target, &mut cargo);
47+
48+
let _folder = build.fold_output(|| format!("stage{}-std", compiler.stage));
49+
println!("Checking std artifacts ({} -> {})", &compiler.host, target);
5050
run_cargo(build,
5151
&mut cargo,
5252
&libstd_stamp(build, compiler, target),
5353
true);
54+
5455
let libdir = builder.sysroot_libdir(compiler, target);
5556
add_to_sysroot(&libdir, &libstd_stamp(build, compiler, target));
5657
}
@@ -86,19 +87,20 @@ impl Step for Rustc {
8687
let compiler = builder.compiler(0, build.build);
8788
let target = self.target;
8889

89-
let _folder = build.fold_output(|| format!("stage{}-rustc", compiler.stage));
90-
println!("Checking compiler artifacts ({} -> {})", &compiler.host, target);
91-
9290
let stage_out = builder.stage_out(compiler, Mode::Librustc);
9391
build.clear_if_dirty(&stage_out, &libstd_stamp(build, compiler, target));
9492
build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target));
9593

9694
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "check");
9795
rustc_cargo(build, &mut cargo);
96+
97+
let _folder = build.fold_output(|| format!("stage{}-rustc", compiler.stage));
98+
println!("Checking compiler artifacts ({} -> {})", &compiler.host, target);
9899
run_cargo(build,
99100
&mut cargo,
100101
&librustc_stamp(build, compiler, target),
101102
true);
103+
102104
let libdir = builder.sysroot_libdir(compiler, target);
103105
add_to_sysroot(&libdir, &librustc_stamp(build, compiler, target));
104106
}
@@ -128,16 +130,18 @@ impl Step for Test {
128130
let target = self.target;
129131
let compiler = builder.compiler(0, build.build);
130132

131-
let _folder = build.fold_output(|| format!("stage{}-test", compiler.stage));
132-
println!("Checking test artifacts ({} -> {})", &compiler.host, target);
133133
let out_dir = build.stage_out(compiler, Mode::Libtest);
134134
build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target));
135135
let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "check");
136136
test_cargo(build, &compiler, target, &mut cargo);
137+
138+
let _folder = build.fold_output(|| format!("stage{}-test", compiler.stage));
139+
println!("Checking test artifacts ({} -> {})", &compiler.host, target);
137140
run_cargo(build,
138141
&mut cargo,
139142
&libtest_stamp(build, compiler, target),
140143
true);
144+
141145
let libdir = builder.sysroot_libdir(compiler, target);
142146
add_to_sysroot(&libdir, &libtest_stamp(build, compiler, target));
143147
}

src/bootstrap/compile.rs

+14-13
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,6 @@ impl Step for Std {
9393
return;
9494
}
9595

96-
let _folder = build.fold_output(|| format!("stage{}-std", compiler.stage));
97-
println!("Building stage{} std artifacts ({} -> {})", compiler.stage,
98-
&compiler.host, target);
99-
10096
if target.contains("musl") {
10197
let libdir = builder.sysroot_libdir(compiler, target);
10298
copy_musl_third_party_objects(build, target, &libdir);
@@ -106,6 +102,10 @@ impl Step for Std {
106102
build.clear_if_dirty(&out_dir, &builder.rustc(compiler));
107103
let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "build");
108104
std_cargo(builder, &compiler, target, &mut cargo);
105+
106+
let _folder = build.fold_output(|| format!("stage{}-std", compiler.stage));
107+
println!("Building stage{} std artifacts ({} -> {})", compiler.stage,
108+
&compiler.host, target);
109109
run_cargo(build,
110110
&mut cargo,
111111
&libstd_stamp(build, compiler, target),
@@ -360,13 +360,14 @@ impl Step for Test {
360360
return;
361361
}
362362

363-
let _folder = build.fold_output(|| format!("stage{}-test", compiler.stage));
364-
println!("Building stage{} test artifacts ({} -> {})", compiler.stage,
365-
&compiler.host, target);
366363
let out_dir = build.stage_out(compiler, Mode::Libtest);
367364
build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target));
368365
let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "build");
369366
test_cargo(build, &compiler, target, &mut cargo);
367+
368+
let _folder = build.fold_output(|| format!("stage{}-test", compiler.stage));
369+
println!("Building stage{} test artifacts ({} -> {})", compiler.stage,
370+
&compiler.host, target);
370371
run_cargo(build,
371372
&mut cargo,
372373
&libtest_stamp(build, compiler, target),
@@ -482,16 +483,16 @@ impl Step for Rustc {
482483
target: build.build,
483484
});
484485

485-
let _folder = build.fold_output(|| format!("stage{}-rustc", compiler.stage));
486-
println!("Building stage{} compiler artifacts ({} -> {})",
487-
compiler.stage, &compiler.host, target);
488-
489486
let stage_out = builder.stage_out(compiler, Mode::Librustc);
490487
build.clear_if_dirty(&stage_out, &libstd_stamp(build, compiler, target));
491488
build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target));
492489

493490
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build");
494491
rustc_cargo(build, &mut cargo);
492+
493+
let _folder = build.fold_output(|| format!("stage{}-rustc", compiler.stage));
494+
println!("Building stage{} compiler artifacts ({} -> {})",
495+
compiler.stage, &compiler.host, target);
495496
run_cargo(build,
496497
&mut cargo,
497498
&librustc_stamp(build, compiler, target),
@@ -634,8 +635,6 @@ impl Step for CodegenBackend {
634635
.arg(build.src.join("src/librustc_trans/Cargo.toml"));
635636
rustc_cargo_env(build, &mut cargo);
636637

637-
let _folder = build.fold_output(|| format!("stage{}-rustc_trans", compiler.stage));
638-
639638
match &*self.backend {
640639
"llvm" | "emscripten" => {
641640
// Build LLVM for our target. This will implicitly build the
@@ -685,6 +684,8 @@ impl Step for CodegenBackend {
685684

686685
let tmp_stamp = build.cargo_out(compiler, Mode::Librustc, target)
687686
.join(".tmp.stamp");
687+
688+
let _folder = build.fold_output(|| format!("stage{}-rustc_trans", compiler.stage));
688689
let files = run_cargo(build,
689690
cargo.arg("--features").arg(features),
690691
&tmp_stamp,

src/bootstrap/configure.py

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def v(*args):
4444
o("docs", "build.docs", "build standard library documentation")
4545
o("compiler-docs", "build.compiler-docs", "build compiler documentation")
4646
o("optimize-tests", "rust.optimize-tests", "build tests with optimizations")
47+
o("experimental-parallel-queries", "rust.experimental-parallel-queries", "build rustc with experimental parallelization")
4748
o("test-miri", "rust.test-miri", "run miri's test suite")
4849
o("debuginfo-tests", "rust.debuginfo-tests", "build tests with debugger metadata")
4950
o("quiet-tests", "rust.quiet-tests", "enable quieter output when running tests")

src/bootstrap/dist.rs

+62-8
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl Step for Docs {
102102

103103
let dst = image.join("share/doc/rust/html");
104104
t!(fs::create_dir_all(&dst));
105-
let src = build.out.join(host).join("doc");
105+
let src = build.doc_out(host);
106106
cp_r(&src, &dst);
107107

108108
let mut cmd = rust_installer(builder);
@@ -120,14 +120,69 @@ impl Step for Docs {
120120
build.run(&mut cmd);
121121
t!(fs::remove_dir_all(&image));
122122

123-
// As part of this step, *also* copy the docs directory to a directory which
124-
// buildbot typically uploads.
125-
if host == build.build {
126-
let dst = distdir(build).join("doc").join(build.rust_package_vers());
127-
t!(fs::create_dir_all(&dst));
128-
cp_r(&src, &dst);
123+
distdir(build).join(format!("{}-{}.tar.gz", name, host))
124+
}
125+
}
126+
127+
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
128+
pub struct RustcDocs {
129+
pub stage: u32,
130+
pub host: Interned<String>,
131+
}
132+
133+
impl Step for RustcDocs {
134+
type Output = PathBuf;
135+
const DEFAULT: bool = true;
136+
137+
fn should_run(run: ShouldRun) -> ShouldRun {
138+
run.path("src/librustc")
139+
}
140+
141+
fn make_run(run: RunConfig) {
142+
run.builder.ensure(RustcDocs {
143+
stage: run.builder.top_stage,
144+
host: run.target,
145+
});
146+
}
147+
148+
/// Builds the `rustc-docs` installer component.
149+
fn run(self, builder: &Builder) -> PathBuf {
150+
let build = builder.build;
151+
let host = self.host;
152+
153+
let name = pkgname(build, "rustc-docs");
154+
155+
println!("Dist compiler docs ({})", host);
156+
if !build.config.compiler_docs {
157+
println!("\tskipping - compiler docs disabled");
158+
return distdir(build).join(format!("{}-{}.tar.gz", name, host));
129159
}
130160

161+
builder.default_doc(None);
162+
163+
let image = tmpdir(build).join(format!("{}-{}-image", name, host));
164+
let _ = fs::remove_dir_all(&image);
165+
166+
let dst = image.join("share/doc/rust/html");
167+
t!(fs::create_dir_all(&dst));
168+
let src = build.compiler_doc_out(host);
169+
cp_r(&src, &dst);
170+
171+
let mut cmd = rust_installer(builder);
172+
cmd.arg("generate")
173+
.arg("--product-name=Rustc-Documentation")
174+
.arg("--rel-manifest-dir=rustlib")
175+
.arg("--success-message=Rustc-documentation-is-installed.")
176+
.arg("--image-dir").arg(&image)
177+
.arg("--work-dir").arg(&tmpdir(build))
178+
.arg("--output-dir").arg(&distdir(build))
179+
.arg(format!("--package-name={}-{}", name, host))
180+
.arg("--component-name=rustc-docs")
181+
.arg("--legacy-manifest-dirs=rustlib,cargo")
182+
.arg("--bulk-dirs=share/doc/rust/html");
183+
build.run(&mut cmd);
184+
t!(fs::remove_dir_all(&image));
185+
131186
distdir(build).join(format!("{}-{}.tar.gz", name, host))
132187
}
133188
}
@@ -1186,7 +1241,6 @@ impl Step for Rustfmt {
11861241
let build = builder.build;
11871242
let stage = self.stage;
11881243
let target = self.target;
1189-
assert!(build.config.extended);
11901244

11911245
println!("Dist Rustfmt stage{} ({})", stage, target);
11921246
let src = build.src.join("src/tools/rustfmt");

0 commit comments

Comments
 (0)