diff options
| author | AliƩnore Bouttefeux <77335613+ABouttefeux@users.noreply.github.com> | 2021-04-05 21:13:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-05 21:13:29 +0200 |
| commit | b08b4848c3653818b47fa8cc0a613455c8b4d255 (patch) | |
| tree | a9162fd1698833dc8cf9ef55af102be906df22d5 /src/bootstrap/tool.rs | |
| parent | 72f534aae1c6cca58b97957d6c225885fcdb4d1b (diff) | |
| parent | 5a7a0ac51eefbdacc5b1763f8d49a787407afb34 (diff) | |
Merge branch 'master' into master
Diffstat (limited to 'src/bootstrap/tool.rs')
| -rw-r--r-- | src/bootstrap/tool.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index bfb846f3b56..f9be35d7c5e 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -513,6 +513,19 @@ impl Step for Rustdoc { // rustc compiler it's paired with, so it must be built with the previous stage compiler. let build_compiler = builder.compiler(target_compiler.stage - 1, builder.config.build); + // When using `download-rustc` and a stage0 build_compiler, copying rustc doesn't actually + // build stage0 libstd (because the libstd in sysroot has the wrong ABI). Explicitly build + // it. + builder.ensure(compile::Std { compiler: build_compiler, target: target_compiler.host }); + builder.ensure(compile::Rustc { compiler: build_compiler, target: target_compiler.host }); + // NOTE: this implies that `download-rustc` is pretty useless when compiling with the stage0 + // compiler, since you do just as much work. + if !builder.config.dry_run && builder.config.download_rustc && build_compiler.stage == 0 { + println!( + "warning: `download-rustc` does nothing when building stage1 tools; consider using `--stage 2` instead" + ); + } + // The presence of `target_compiler` ensures that the necessary libraries (codegen backends, // compiler libraries, ...) are built. Rustdoc does not require the presence of any // libraries within sysroot_libdir (i.e., rustlib), though doctests may want it (since |
