--- /dev/null
+From 35f8a2065b7d17d39481a75cefa739df7a061084 Mon Sep 17 00:00:00 2001
+From: Josh Stone <jistone@redhat.com>
+Date: Wed, 30 Aug 2017 18:20:59 -0700
+Subject: [PATCH] rustbuild: update the rust-src filter for compiler-rt
+
+We wanted `src/compiler-rt/test` filtered from the `rust-src` package,
+but that path is now `src/libcompiler_builtins/compiler-rt/test`. This
+saves over half of the installed rust-src size. (50MB -> 22MB)
+---
+ src/bootstrap/dist.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+index 746f85a9d59d..05d59e7d5956 100644
+--- a/src/bootstrap/dist.rs
++++ b/src/bootstrap/dist.rs
+@@ -754,7 +754,7 @@ impl Step for Src {
+ "src/libprofiler_builtins",
+ ];
+ let std_src_dirs_exclude = [
+- "src/compiler-rt/test",
++ "src/libcompiler_builtins/compiler-rt/test",
+ "src/jemalloc/test/unit",
+ ];
+
+--
+2.13.5
+
# To bootstrap from scratch, set the channel and date from src/stage0.txt
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD
-%define bootstrap_rust 1.17.0
-%define bootstrap_cargo 0.18.0
-%define bootstrap_date 2017-04-27
+%define bootstrap_rust 1.20.0
+%define bootstrap_cargo 0.21.0
+%define bootstrap_date 2017-08-31
Summary: The Rust Programming Language
Summary(pl.UTF-8): Język programowania Rust
Name: rust
-Version: 1.19.0
+Version: 1.21.0
Release: 1
# Licenses: (rust itself) and (bundled libraries)
License: (Apache v2.0 or MIT) and (BSD and ISC and MIT)
Group: Development/Languages
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.gz
-# Source0-md5: 75e779670ac79edf023497a9c37eb35d
+# Source0-md5: bc494706b764276613064aad52922f53
Source1: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.gz
-# Source1-md5: 98e8f479515969123b4c203191104a54
+# Source1-md5: 5b63778b4877bcfd431b56c485f4876b
Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.gz
-# Source2-md5: 2d5de850c32aa8d40c8c21abacf749f8
+# Source2-md5: 5e8c3a6a7b94e6a32f85230111a684a3
+Patch0: rust-1.21.0-44203-exclude-compiler-rt-test.patch
URL: https://www.rust-lang.org/
# for src/compiler-rt
BuildRequires: cmake >= 3.4.3
%prep
%setup -q -n %{rustc_package}
+%patch0 -p1
%if %{with bootstrap}
%ifarch %{x8664}
sed -i -e 's#DIRECTORY=".*"#DIRECTORY="%{_datadir}/%{name}/etc"#' \
src/etc/rust-gdb
-# These tests assume that alloc_jemalloc is present
-sed -i -e '1i // ignore-test jemalloc is disabled' \
- src/test/compile-fail/allocator-dylib-is-system.rs \
- src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs \
- src/test/run-pass/allocator-default.rs
+# The configure macro will modify some autoconf-related files, which upsets
+# cargo when it tries to verify checksums in those files. If we just truncate
+# that file list, cargo won't have anything to complain about.
+find src/vendor -name .cargo-checksum.json \
+ -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+'
%build
%configure \
--disable-jemalloc \
--disable-option-checking \
--disable-rpath \
+ --disable-debuginfo-lines \
+ --disable-debuginfo-only-std \
--enable-debuginfo \
--enable-llvm-link-shared \
--enable-local-rust --local-rust-root=%{local_rust_root} \