rust/hopefully-fix-rustdoc-build.patch
Luke Jones f55288c081 Accepting request 746768 from home:aplanas:branches:devel:languages:rust
- Add hopefully-fix-rustdoc-build.patch to fix rustdoc compilation
- Update to version 1.39.0
  + Language
    - You can now create async functions and blocks with async fn,
      async move {}, and async {} respectively, and you can now call
      .await on async expressions.
    - You can now use certain attributes on function, closure, and
      function pointer parameters.
    - You can now take shared references to bind-by-move patterns in
      the if guards of match arms.
  + Compiler
    - Added tier 3 support for the i686-unknown-uefi target.
    - Added tier 3 support for the sparc64-unknown-openbsd target.
    - rustc will now trim code snippets in diagnostics to fit in your
      terminal.
    - You can now pass --show-output argument to test binaries to
      print the output of successful tests.
  + For more details:
    https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1390-2019-11-07
- Drop patches already merged in upstream:
  + rust-61206-assume-tarball-llvm-is-fresh.patch
  + add-option-to-allow-warnings.patch

OBS-URL: https://build.opensuse.org/request/show/746768
OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=233
2019-11-09 09:53:14 +00:00

36 lines
1.7 KiB
Diff

From 73369f32621f6a844a80a8513ae3ded901e4a406 Mon Sep 17 00:00:00 2001
From: Mark Rousskov <mark.simulacrum@gmail.com>
Date: Tue, 5 Nov 2019 11:16:46 -0500
Subject: [PATCH] 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.
---
src/bootstrap/builder.rs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
Index: rustc-1.39.0-src/src/bootstrap/builder.rs
===================================================================
--- rustc-1.39.0-src.orig/src/bootstrap/builder.rs
+++ rustc-1.39.0-src/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);