From: Mark Rousskov Date: Tue, 5 Nov 2019 16:16:46 +0000 (-0500) Subject: Hopefully fix rustdoc build X-Git-Tag: archive/raspbian/1.39.0+dfsg1-4+rpi1^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4abf56d6ed5df5d6874fa11a75cf93667a8d46e4;p=rustc.git Hopefully fix rustdoc build It's super unclear why this broke when we switched to beta but not previously -- but at least it's hopefully fixed now. Gbp-Pq: Name u-0001-Hopefully-fix-rustdoc-build.patch --- diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 5d586f0c46..bad92d7738 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -875,7 +875,18 @@ impl<'a> Builder<'a> { // things still build right, please do! match mode { Mode::Std => metadata.push_str("std"), - _ => {}, + // When we're building rustc tools, they're built with a search path + // that contains things built during the rustc build. For example, + // bitflags is built during the rustc build, and is a dependency of + // rustdoc as well. We're building rustdoc in a different target + // directory, though, which means that Cargo will rebuild the + // dependency. When we go on to build rustdoc, we'll look for + // bitflags, and find two different copies: one built during the + // rustc step and one that we just built. This isn't always a + // problem, somehow -- not really clear why -- but we know that this + // fixes things. + Mode::ToolRustc => metadata.push_str("tool-rustc"), + _ => {} } cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);