about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-11-27 20:51:52 +0100
committerRalf Jung <post@ralfj.de>2022-11-27 20:51:52 +0100
commit7c12ed1d5dc6059972b06fb7257a239f3a33ec88 (patch)
treefd57c555e715f92ec17d90a702860a6740d32ce8 /src/bootstrap/builder.rs
parent187ba6778174717b9d793aec363e836c947b55a5 (diff)
parent454784afba5bf35b5ff14ada0e31265ad1d75e73 (diff)
Merge from rustc
Diffstat (limited to 'src/bootstrap/builder.rs')
-rw-r--r--src/bootstrap/builder.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 8d999302a6d..251431a15eb 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -1094,7 +1094,13 @@ impl<'a> Builder<'a> {
             let my_out = match mode {
                 // This is the intended out directory for compiler documentation.
                 Mode::Rustc | Mode::ToolRustc => self.compiler_doc_out(target),
-                Mode::Std => out_dir.join(target.triple).join("doc"),
+                Mode::Std => {
+                    if self.config.cmd.json() {
+                        out_dir.join(target.triple).join("json-doc")
+                    } else {
+                        out_dir.join(target.triple).join("doc")
+                    }
+                }
                 _ => panic!("doc mode {:?} not expected", mode),
             };
             let rustdoc = self.rustdoc(compiler);