about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorRune Tynan <runetynan@gmail.com>2021-01-15 20:34:15 -0500
committerRune Tynan <runetynan@gmail.com>2021-01-19 14:24:25 -0500
commit7715656edd201b8c6bbddf0040f424c27e4db4df (patch)
treea3c2f7b0835fd4f3728d85755df926566ee29f36 /src/bootstrap
parentf09fb488f70c5965ec4f64453a6e681fbfcff56c (diff)
downloadrust-7715656edd201b8c6bbddf0040f424c27e4db4df.tar.gz
rust-7715656edd201b8c6bbddf0040f424c27e4db4df.zip
Add jsondocck tool, and use it for rustdoc JSON
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/builder.rs5
-rw-r--r--src/bootstrap/test.rs2
-rw-r--r--src/bootstrap/tool.rs1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 62065e27dd9..103fe32fa82 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -751,6 +751,11 @@ impl<'a> Builder<'a> {
         cmd
     }
 
+    /// Gets a path to the jsondocck tool
+    pub fn jsondocck(&self, compiler: Compiler, target: TargetSelection) -> PathBuf {
+        self.ensure(tool::JsonDocCk { compiler, target })
+    }
+
     /// Return the path to `llvm-config` for the target, if it exists.
     ///
     /// Note that this returns `None` if LLVM is disabled, or if we're in a
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 2e8c574044e..baa3e36dc51 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1072,6 +1072,8 @@ note: if you're sure you want to do this, please open an issue as to why. In the
 
         cmd.arg("--docck-python").arg(builder.python());
 
+        cmd.arg("--jsondocck-path").arg(builder.jsondocck(compiler, target));
+
         if builder.config.build.ends_with("apple-darwin") {
             // Force /usr/bin/python3 on macOS for LLDB tests because we're loading the
             // LLDB plugin's compiled module which only works with the system python
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index dc786249d99..999ce71ff6e 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -367,6 +367,7 @@ bootstrap_tool!(
     RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes";
     ExpandYamlAnchors, "src/tools/expand-yaml-anchors", "expand-yaml-anchors";
     LintDocs, "src/tools/lint-docs", "lint-docs";
+    JsonDocCk, "src/tools/jsondocck", "jsondocck", is_unstable_tool = true;
 );
 
 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]