Cargotest needs only one rustdoc.exe to exist on Windows

This commit is contained in:
Mark Simulacrum 2017-08-13 05:07:01 +05:00
parent 657196830f
commit 82cdf1006e
2 changed files with 8 additions and 2 deletions

View File

@ -277,8 +277,11 @@ impl Step for Rustdoc {
let mut cargo = prepare_tool_cargo(builder, build_compiler, target, "rustdoc");
build.run(&mut cargo);
// Cargo adds a number of paths to the dylib search path on windows, which results in
// the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool"
// rustdoc a different name.
let tool_rustdoc = build.cargo_out(build_compiler, Mode::Tool, target)
.join(exe("rustdoc", &target_compiler.host));
.join(exe("rustdoc-tool-binary", &target_compiler.host));
// don't create a stage0-sysroot/bin directory.
if target_compiler.stage > 0 {

View File

@ -3,8 +3,11 @@ name = "rustdoc-tool"
version = "0.0.0"
authors = ["The Rust Project Developers"]
# Cargo adds a number of paths to the dylib search path on windows, which results in
# the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool"
# rustdoc a different name.
[[bin]]
name = "rustdoc"
name = "rustdoc-tool-binary"
path = "main.rs"
[dependencies]