about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-09-25 23:20:33 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2018-10-21 01:15:14 +0200
commitf7c8258037e44fe367326a582a8a0378a26d3082 (patch)
tree6606b3b031f33ff9b82bd10360d2a0e54444fc71 /src/bootstrap
parentfb2813bcab3b031b92566daaf0c4debb22aa0f70 (diff)
downloadrust-f7c8258037e44fe367326a582a8a0378a26d3082.tar.gz
rust-f7c8258037e44fe367326a582a8a0378a26d3082.zip
new version for bootstrap
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/doc.rs29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 5e02444490c..99185e4ca5b 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -405,7 +405,7 @@ impl Step for Standalone {
             cmd.arg("--html-after-content").arg(&footer)
                .arg("--html-before-content").arg(&version_info)
                .arg("--html-in-header").arg(&favicon)
-               .arg("--index-page").arg("src/doc/index.md")
+               .arg("--index-page").arg(&builder.src.join("src/doc/index.md"))
                .arg("--markdown-playground-url")
                .arg("https://play.rust-lang.org/")
                .arg("-o").arg(&out)
@@ -482,22 +482,27 @@ impl Step for Std {
         let my_out = builder.crate_doc_out(target);
         t!(symlink_dir_force(&builder.config, &my_out, &out_dir));
 
-        let mut cargo = builder.cargo(compiler, Mode::Std, target, "doc");
-        compile::std_cargo(builder, &compiler, target, &mut cargo);
+        let run_cargo_rustdoc_for = |package: &str| {
+            let mut cargo = builder.cargo(compiler, Mode::Std, target, "rustdoc");
+            compile::std_cargo(builder, &compiler, target, &mut cargo);
 
-        // Keep a whitelist so we do not build internal stdlib crates, these will be
-        // build by the rustc step later if enabled.
-        cargo.arg("--no-deps");
-        for krate in &["alloc", "core", "std"] {
-            cargo.arg("-p").arg(krate);
+            // Keep a whitelist so we do not build internal stdlib crates, these will be
+            // build by the rustc step later if enabled.
+            cargo.arg("-Z").arg("unstable-options")
+                 .arg("-p").arg(package);
             // Create all crate output directories first to make sure rustdoc uses
             // relative links.
             // FIXME: Cargo should probably do this itself.
-            t!(fs::create_dir_all(out_dir.join(krate)));
-        }
+            t!(fs::create_dir_all(out_dir.join(package)));
+            cargo.arg("--")
+                 .arg("index-page").arg(&builder.src.join("src/doc/index.md"));
 
-        builder.run(&mut cargo);
-        builder.cp_r(&my_out, &out);
+            builder.run(&mut cargo);
+            builder.cp_r(&my_out, &out);
+        };
+        for krate in &["alloc", "core", "std"] {
+            run_cargo_rustdoc_for(krate);
+        }
     }
 }