Skip to content

Commit

Permalink
Fix crate-version with rustdoc in bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Aug 14, 2020
1 parent 8e21bd0 commit 73b7a04
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
6 changes: 0 additions & 6 deletions src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ fn main() {
cmd.arg(arg);
}

// Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick
// it up so we can make rustdoc print this into the docs
if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") {
cmd.arg("--crate-version").arg(version);
}

// Needed to be able to run all rustdoc tests.
if let Some(ref x) = env::var_os("RUSTDOC_RESOURCE_SUFFIX") {
// This "unstable-options" can be removed when `--resource-suffix` is stabilized
Expand Down
3 changes: 1 addition & 2 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@ impl<'a> Builder<'a> {
.env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler))
.env("CFG_RELEASE_CHANNEL", &self.config.channel)
.env("RUSTDOC_REAL", self.rustdoc(compiler))
.env("RUSTDOC_CRATE_VERSION", self.rust_version())
.env("RUSTC_BOOTSTRAP", "1")
.arg("-Winvalid_codeblock_attributes");
if self.config.deny_warnings {
Expand Down Expand Up @@ -1271,7 +1270,7 @@ impl<'a> Builder<'a> {
}

// For `cargo doc` invocations, make rustdoc print the Rust version into the docs
cargo.env("RUSTDOC_CRATE_VERSION", self.rust_version());
rustdocflags.arg("--crate-version").arg(&self.rust_version());

// Environment variables *required* throughout the build
//
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ impl Step for RustdocTheme {
.env("RUSTDOC_LIBDIR", builder.sysroot_libdir(self.compiler, self.compiler.host))
.env("CFG_RELEASE_CHANNEL", &builder.config.channel)
.env("RUSTDOC_REAL", builder.rustdoc(self.compiler))
.env("RUSTDOC_CRATE_VERSION", builder.rust_version())
.env("RUSTC_BOOTSTRAP", "1");
if let Some(linker) = builder.linker(self.compiler.host, true) {
cmd.env("RUSTC_TARGET_LINKER", linker);
Expand Down

0 comments on commit 73b7a04

Please sign in to comment.