Skip to content

Commit 82cdf10

Browse files
Cargotest needs only one rustdoc.exe to exist on Windows
1 parent 6571968 commit 82cdf10

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/bootstrap/tool.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,11 @@ impl Step for Rustdoc {
277277

278278
let mut cargo = prepare_tool_cargo(builder, build_compiler, target, "rustdoc");
279279
build.run(&mut cargo);
280+
// Cargo adds a number of paths to the dylib search path on windows, which results in
281+
// the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool"
282+
// rustdoc a different name.
280283
let tool_rustdoc = build.cargo_out(build_compiler, Mode::Tool, target)
281-
.join(exe("rustdoc", &target_compiler.host));
284+
.join(exe("rustdoc-tool-binary", &target_compiler.host));
282285

283286
// don't create a stage0-sysroot/bin directory.
284287
if target_compiler.stage > 0 {

src/tools/rustdoc/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ name = "rustdoc-tool"
33
version = "0.0.0"
44
authors = ["The Rust Project Developers"]
55

6+
# Cargo adds a number of paths to the dylib search path on windows, which results in
7+
# the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool"
8+
# rustdoc a different name.
69
[[bin]]
7-
name = "rustdoc"
10+
name = "rustdoc-tool-binary"
811
path = "main.rs"
912

1013
[dependencies]

0 commit comments

Comments
 (0)