about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-02-24 21:32:48 -0500
committerJoshua Nelson <jyn514@gmail.com>2021-02-24 21:32:48 -0500
commitfe2b93bcc5daf730a92df6b3bd6677484f8d3a06 (patch)
tree069ed1116ce19092d660488e65d73693c7560c57 /src/bootstrap
parenta8486b64b0c87dabd045453b6c81500015d122d6 (diff)
downloadrust-fe2b93bcc5daf730a92df6b3bd6677484f8d3a06.tar.gz
rust-fe2b93bcc5daf730a92df6b3bd6677484f8d3a06.zip
Rename the `tidy` binary to `rust-tidy`
This avoids naming collisions, particularly on Windows where the
dynamic library variable is PATH and setting it causes the in-tree
`tidy` to take precedence over the HTML tidy used by compiletest.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/tool.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 5c874f69bd9..71aa6bb150e 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -47,7 +47,7 @@ impl Step for ToolBuild {
     fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
         let compiler = self.compiler;
         let target = self.target;
-        let tool = self.tool;
+        let mut tool = self.tool;
         let path = self.path;
         let is_optional_tool = self.is_optional_tool;
 
@@ -208,6 +208,12 @@ impl Step for ToolBuild {
                 None
             }
         } else {
+            // HACK(#82501): on Windows, the tools directory gets added to PATH when running tests, and
+            // compiletest confuses HTML tidy with the in-tree tidy. Name the in-tree tidy something
+            // different so the problem doesn't come up.
+            if tool == "tidy" {
+                tool = "rust-tidy";
+            }
             let cargo_out =
                 builder.cargo_out(compiler, self.mode, target).join(exe(tool, compiler.host));
             let bin = builder.tools_dir(compiler).join(exe(tool, compiler.host));