diff options
| author | Eric Huss <eric@huss.org> | 2024-07-15 13:30:52 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2024-07-22 07:20:57 -0700 |
| commit | 5dfa062b87f3711c9d16912037ec39b6437fa91f (patch) | |
| tree | defa72e9b451514275d2bca4425f7afc3c584179 /src/bootstrap | |
| parent | aee3dc4c6cc0e018b648a340fb98af10887ce4ba (diff) | |
| download | rust-5dfa062b87f3711c9d16912037ec39b6437fa91f.tar.gz rust-5dfa062b87f3711c9d16912037ec39b6437fa91f.zip | |
Move rustbook to its own workspace.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/dist.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/doc.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/vendor.rs | 7 | ||||
| -rw-r--r-- | src/bootstrap/src/lib.rs | 2 |
4 files changed, 14 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 1e9d2025bc7..7d67cc3b36e 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1040,6 +1040,8 @@ impl Step for PlainSourceTarball { .arg(builder.src.join("./src/tools/opt-dist/Cargo.toml")) .arg("--sync") .arg(builder.src.join("./src/tools/rustc-perf/Cargo.toml")) + .arg("--sync") + .arg(builder.src.join("./src/tools/rustbook/Cargo.toml")) // Will read the libstd Cargo.toml // which uses the unstable `public-dependency` feature. .env("RUSTC_BOOTSTRAP", "1") diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs index 633e66afe59..d8204ea00f7 100644 --- a/src/bootstrap/src/core/build_steps/doc.rs +++ b/src/bootstrap/src/core/build_steps/doc.rs @@ -1172,6 +1172,12 @@ impl Step for RustcBook { /// in the "md-doc" directory in the build output directory. Then /// "rustbook" is used to convert it to HTML. fn run(self, builder: &Builder<'_>) { + // These submodules are required to be checked out to build rustbook + // because they have Cargo dependencies that are needed. + #[allow(clippy::single_element_loop)] // This will change soon. + for path in ["src/doc/book"] { + builder.update_submodule(Path::new(path)); + } let out_base = builder.md_doc_out(self.target).join("rustc"); t!(fs::create_dir_all(&out_base)); let out_listing = out_base.join("src/lints"); diff --git a/src/bootstrap/src/core/build_steps/vendor.rs b/src/bootstrap/src/core/build_steps/vendor.rs index 62342ee4792..e6b3cb320cf 100644 --- a/src/bootstrap/src/core/build_steps/vendor.rs +++ b/src/bootstrap/src/core/build_steps/vendor.rs @@ -34,8 +34,10 @@ impl Step for Vendor { cmd.arg("--versioned-dirs"); } - // cargo submodule must be present for `x vendor` to work. - builder.build.update_submodule(Path::new("src/tools/cargo")); + // These submodules must be present for `x vendor` to work. + for path in ["src/tools/cargo", "src/doc/book"] { + builder.build.update_submodule(Path::new(path)); + } // Sync these paths by default. for p in [ @@ -44,6 +46,7 @@ impl Step for Vendor { "compiler/rustc_codegen_cranelift/Cargo.toml", "compiler/rustc_codegen_gcc/Cargo.toml", "src/bootstrap/Cargo.toml", + "src/tools/rustbook/Cargo.toml", ] { cmd.arg("--sync").arg(builder.src.join(p)); } diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index d2910f8edc6..79bea50c626 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -439,7 +439,7 @@ impl Build { // Make sure we update these before gathering metadata so we don't get an error about missing // Cargo.toml files. - let rust_submodules = ["src/doc/book", "library/backtrace", "library/stdarch"]; + let rust_submodules = ["library/backtrace", "library/stdarch"]; for s in rust_submodules { build.update_submodule(Path::new(s)); } |
