diff options
author | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-11-24 17:12:19 +0000 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-11-24 22:00:38 +0000 |
commit | b08fc57094f3643e7af68d87b8ff3bad8c253882 (patch) | |
tree | a3e74ee7f53536e809bfad4ae13d95be75f8bd83 /community/rust/rustdoc-fix-conflicting-symbols.patch | |
parent | 744fbf64b6a7f549c386ecaba4cc81356e46a1a9 (diff) | |
download | aports-b08fc57094f3643e7af68d87b8ff3bad8c253882.tar.bz2 aports-b08fc57094f3643e7af68d87b8ff3bad8c253882.tar.xz |
community/rust: fix build error with rustdoc
Building rust fails with the error:
error[E0523]: found two different crates with name `bitflags` that are not
distinguished by differing `-C metadata`. This will result in symbol conflicts
between the two.
--> src/librustdoc/html/markdown.rs:36:5
|
36 | use pulldown_cmark::{html, CowStr, Event, Options, Parser, Tag};
| ^^^^^^^^^^^^^^
Upstream fixed it with the included patch.
Diffstat (limited to 'community/rust/rustdoc-fix-conflicting-symbols.patch')
-rw-r--r-- | community/rust/rustdoc-fix-conflicting-symbols.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/community/rust/rustdoc-fix-conflicting-symbols.patch b/community/rust/rustdoc-fix-conflicting-symbols.patch new file mode 100644 index 0000000000..b399b16bf9 --- /dev/null +++ b/community/rust/rustdoc-fix-conflicting-symbols.patch @@ -0,0 +1,35 @@ +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(-) + +diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs +index 2748903f2d47..2edcef203ad2 100644 +--- a/src/bootstrap/builder.rs ++++ b/src/bootstrap/builder.rs +@@ -886,7 +886,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); + |