Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustbuild: Fix test "test rustdoc" invocation #44616

Merged
merged 1 commit into from
Sep 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});
Expand Down
8 changes: 5 additions & 3 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand Down Expand Up @@ -283,6 +284,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
Expand Down