diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-09-16 09:17:03 -0500 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-09-16 17:09:41 -0700 |
| commit | 9eae11183117f39af9a53221c281a370dab6f29b (patch) | |
| tree | ebd1295fd7b3f09e581a5d452967134f1099998f | |
| parent | 0df4e926628291805e1aea10ae3ce565bb034a53 (diff) | |
| parent | 3da54fb03613b4fb65f3e43fd8e2d05bc7866c53 (diff) | |
| download | rust-9eae11183117f39af9a53221c281a370dab6f29b.tar.gz rust-9eae11183117f39af9a53221c281a370dab6f29b.zip | |
Rollup merge of #44616 - alexcrichton:rustdoc-fix-again-whee, r=Mark-Simulacrum
rustbuild: Fix test "test rustdoc" invocation Previously it would use the librustc output directory which would cause rustdoc to get entirely recompiled, whereas the intention is that it uses the already-compiled artifacts from building rustdoc itself, using the tool output directory
| -rw-r--r-- | src/bootstrap/check.rs | 9 | ||||
| -rw-r--r-- | src/bootstrap/tool.rs | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 0d5c3addd9e..5853d5ae320 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -1118,10 +1118,11 @@ impl Step for Rustdoc { let compiler = builder.compiler(builder.top_stage, self.host); let target = compiler.host; - builder.ensure(RemoteCopyLibs { compiler, target }); - - let mut cargo = builder.cargo(compiler, Mode::Librustc, target, test_kind.subcommand()); - compile::rustc_cargo(build, &compiler, target, &mut cargo); + let mut cargo = tool::prepare_tool_cargo(builder, + compiler, + target, + test_kind.subcommand(), + "src/tools/rustdoc"); let _folder = build.fold_output(|| { format!("{}_stage{}-rustdoc", test_kind.subcommand(), compiler.stage) }); diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 9b861ae429d..a4e9f682358 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -94,20 +94,21 @@ impl Step for ToolBuild { let _folder = build.fold_output(|| format!("stage{}-{}", compiler.stage, tool)); println!("Building stage{} tool {} ({})", compiler.stage, tool, target); - let mut cargo = prepare_tool_cargo(builder, compiler, target, path); + let mut cargo = prepare_tool_cargo(builder, compiler, target, "build", path); build.run(&mut cargo); build.cargo_out(compiler, Mode::Tool, target).join(exe(tool, &compiler.host)) } } -fn prepare_tool_cargo( +pub fn prepare_tool_cargo( builder: &Builder, compiler: Compiler, target: Interned<String>, + command: &'static str, path: &'static str, ) -> Command { let build = builder.build; - let mut cargo = builder.cargo(compiler, Mode::Tool, target, "build"); + let mut cargo = builder.cargo(compiler, Mode::Tool, target, command); let dir = build.src.join(path); cargo.arg("--manifest-path").arg(dir.join("Cargo.toml")); @@ -295,6 +296,7 @@ impl Step for Rustdoc { let mut cargo = prepare_tool_cargo(builder, build_compiler, target, + "build", "src/tools/rustdoc"); build.run(&mut cargo); // Cargo adds a number of paths to the dylib search path on windows, which results in |
