mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Add build.rustdoc option to bootstrap config
This commit is contained in:
@@ -302,6 +302,11 @@
|
||||
# If you set this, you likely want to set `cargo` as well.
|
||||
#build.rustc = "/path/to/rustc"
|
||||
|
||||
# Use this rustdoc binary as the stage0 snapshot rustdoc.
|
||||
# If unspecified, then the binary "rustdoc" (with platform-specific extension, e.g. ".exe")
|
||||
# in the same directory as "rustc" will be used.
|
||||
#build.rustdoc = "/path/to/rustdoc"
|
||||
|
||||
# Instead of downloading the src/stage0 version of rustfmt specified,
|
||||
# use this rustfmt binary instead as the stage0 snapshot rustfmt.
|
||||
#build.rustfmt = "/path/to/rustfmt"
|
||||
|
||||
@@ -298,6 +298,7 @@ pub struct Config {
|
||||
// These are either the stage0 downloaded binaries or the locally installed ones.
|
||||
pub initial_cargo: PathBuf,
|
||||
pub initial_rustc: PathBuf,
|
||||
pub initial_rustdoc: PathBuf,
|
||||
pub initial_cargo_clippy: Option<PathBuf>,
|
||||
pub initial_sysroot: PathBuf,
|
||||
pub initial_rustfmt: Option<PathBuf>,
|
||||
@@ -456,6 +457,7 @@ pub(crate) fn parse_inner(
|
||||
build_dir: build_build_dir,
|
||||
cargo: mut build_cargo,
|
||||
rustc: mut build_rustc,
|
||||
rustdoc: build_rustdoc,
|
||||
rustfmt: build_rustfmt,
|
||||
cargo_clippy: build_cargo_clippy,
|
||||
docs: build_docs,
|
||||
@@ -751,6 +753,9 @@ pub(crate) fn parse_inner(
|
||||
default_stage0_rustc_path(&out)
|
||||
});
|
||||
|
||||
let initial_rustdoc = build_rustdoc
|
||||
.unwrap_or_else(|| initial_rustc.with_file_name(exe("rustdoc", host_target)));
|
||||
|
||||
let initial_sysroot = t!(PathBuf::from_str(
|
||||
command(&initial_rustc)
|
||||
.args(["--print", "sysroot"])
|
||||
@@ -1348,6 +1353,7 @@ pub(crate) fn parse_inner(
|
||||
initial_cargo,
|
||||
initial_cargo_clippy: build_cargo_clippy,
|
||||
initial_rustc,
|
||||
initial_rustdoc,
|
||||
initial_rustfmt,
|
||||
initial_sysroot,
|
||||
jemalloc: rust_jemalloc.unwrap_or(false),
|
||||
|
||||
@@ -25,6 +25,7 @@ struct Build {
|
||||
build_dir: Option<String> = "build-dir",
|
||||
cargo: Option<PathBuf> = "cargo",
|
||||
rustc: Option<PathBuf> = "rustc",
|
||||
rustdoc: Option<PathBuf> = "rustdoc",
|
||||
rustfmt: Option<PathBuf> = "rustfmt",
|
||||
cargo_clippy: Option<PathBuf> = "cargo-clippy",
|
||||
docs: Option<bool> = "docs",
|
||||
|
||||
@@ -535,9 +535,7 @@ pub fn new(mut config: Config) -> Build {
|
||||
initial_lld,
|
||||
initial_relative_libdir,
|
||||
initial_rustc: config.initial_rustc.clone(),
|
||||
initial_rustdoc: config
|
||||
.initial_rustc
|
||||
.with_file_name(exe("rustdoc", config.host_target)),
|
||||
initial_rustdoc: config.initial_rustdoc.clone(),
|
||||
initial_cargo: config.initial_cargo.clone(),
|
||||
initial_sysroot: config.initial_sysroot.clone(),
|
||||
local_rebuild: config.local_rebuild,
|
||||
|
||||
Reference in New Issue
Block a user