Update to 1.27.0.

This commit is contained in:
Josh Stone 2018-06-21 16:49:11 -07:00
parent 9552deab48
commit 143aecadf1
6 changed files with 115 additions and 227 deletions

8
.gitignore vendored
View File

@ -124,3 +124,11 @@
/rust-1.25.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.26.1-src.tar.xz
/rustc-1.26.2-src.tar.xz
/rustc-1.27.0-src.tar.xz
/rust-1.26.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.26.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.26.0-i686-unknown-linux-gnu.tar.xz
/rust-1.26.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.26.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.26.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.26.0-x86_64-unknown-linux-gnu.tar.xz

View File

@ -0,0 +1,70 @@
From ab80da4ea9ea88cdd802f80955e7382bd9368247 Mon Sep 17 00:00:00 2001
From: Benjamin Gill <github@bgill.eu>
Date: Sat, 16 Jun 2018 12:59:44 +0100
Subject: [PATCH] Fix new renamed_and_removed_lints warning (#247)
I've verified that this now produces no warnings with Rust 1.26.1 and
1.28.0-nightly (c3b09c968 2018-05-27)
---
src/error_chain.rs | 4 ++--
src/impl_error_chain_kind.rs | 4 ++--
src/lib.rs | 1 -
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/error_chain.rs b/src/error_chain.rs
index cbd42cd67eaf..0926c8889278 100644
--- a/src/error_chain.rs
+++ b/src/error_chain.rs
@@ -173,7 +173,7 @@ macro_rules! impl_error_chain_processed {
self.0.description()
}
- #[allow(unknown_lints, unused_doc_comment)]
+ #[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
fn cause(&self) -> Option<&::std::error::Error> {
match self.1.next_error {
Some(ref c) => Some(&**c),
@@ -424,7 +424,7 @@ macro_rules! impl_extract_backtrace {
($error_name: ident
$error_kind_name: ident
$([$link_error_path: path, $(#[$meta_links: meta])*])*) => {
- #[allow(unknown_lints, unused_doc_comment)]
+ #[allow(unknown_lints, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
fn extract_backtrace(e: &(::std::error::Error + Send + 'static))
-> Option<::std::sync::Arc<$crate::Backtrace>> {
if let Some(e) = e.downcast_ref::<$error_name>() {
diff --git a/src/impl_error_chain_kind.rs b/src/impl_error_chain_kind.rs
index d6c05c8a882b..d5e266389cd6 100644
--- a/src/impl_error_chain_kind.rs
+++ b/src/impl_error_chain_kind.rs
@@ -264,7 +264,7 @@ macro_rules! impl_error_chain_kind {
$item:ident: $imode:tt [$(#[$imeta:meta])*] [$( $var:ident: $typ:ty ),*] {$( $funcs:tt )*}
)*}
) => {
- #[allow(unknown_lints, unused, unused_doc_comment)]
+ #[allow(unknown_lints, unused, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
impl ::std::fmt::Display for $name {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter)
-> ::std::fmt::Result
@@ -316,7 +316,7 @@ macro_rules! impl_error_chain_kind {
}
}
}*/
- #[allow(unknown_lints, unused, unused_doc_comment)]
+ #[allow(unknown_lints, unused, renamed_and_removed_lints, unused_doc_comment, unused_doc_comments)]
impl $name {
/// A string describing the error kind.
pub fn description(&self) -> &str {
diff --git a/src/lib.rs b/src/lib.rs
index d0881fcef1c1..6421194f8ca8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,4 @@
#![deny(missing_docs)]
-#![allow(unknown_lints)] // to be removed when unused_doc_comments lints is merged
#![doc(html_root_url = "https://docs.rs/error-chain/0.11.0")]
//! A library for consistent and reliable error handling
--
2.17.1

View File

@ -1,195 +0,0 @@
From cc2906cb26304301709557a88ac4a3334b88616b Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 13 Apr 2018 16:52:54 -0700
Subject: [PATCH 1/3] rustbuild: allow building tools with debuginfo
Debugging information for the extended tools is currently disabled for
concerns about the size. This patch adds `--enable-debuginfo-tools` to
let one opt into having that debuginfo.
This is useful for debugging the tools in distro packages. We always
strip debuginfo into separate packages anyway, so the extra size is not
a concern in regular use.
---
CONTRIBUTING.md | 1 +
config.toml.example | 4 ++++
src/bootstrap/builder.rs | 12 ++++++++----
src/bootstrap/config.rs | 5 +++++
src/bootstrap/configure.py | 1 +
5 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7a62405f0596..73d4188d6954 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -121,6 +121,7 @@ configuration used in the build process. Some options to note:
#### `[rust]`:
- `debuginfo = true` - Build a compiler with debuginfo. Makes building rustc slower, but then you can use a debugger to debug `rustc`.
- `debuginfo-lines = true` - An alternative to `debuginfo = true` that doesn't let you use a debugger, but doesn't make building rustc slower and still gives you line numbers in backtraces.
+- `debuginfo-tools = true` - Build the extended tools with debuginfo.
- `debug-assertions = true` - Makes the log output of `debug!` work.
- `optimize = false` - Disable optimizations to speed up compilation of stage1 rust, but makes the stage1 compiler x100 slower.
diff --git a/config.toml.example b/config.toml.example
index 68bc7dfe720f..bd18a604a9c8 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -262,6 +262,10 @@
# standard library.
#debuginfo-only-std = false
+# Enable debuginfo for the extended tools: cargo, rls, rustfmt
+# Adding debuginfo increases their sizes by a factor of 3-4.
+#debuginfo-tools = false
+
# Whether or not jemalloc is built and enabled
#use-jemalloc = true
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 7ff64af91967..ae19c66d6070 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -622,10 +622,14 @@ impl<'a> Builder<'a> {
cargo.env("RUSTDOC_LIBDIR", self.rustc_libdir(self.compiler(2, self.build.build)));
}
- if mode != Mode::Tool {
- // Tools don't get debuginfo right now, e.g. cargo and rls don't
- // get compiled with debuginfo.
- // Adding debuginfo increases their sizes by a factor of 3-4.
+ if mode == Mode::Tool {
+ // Tools like cargo and rls don't get debuginfo by default right now, but this can be
+ // enabled in the config. Adding debuginfo increases their sizes by a factor of 3-4.
+ if self.config.rust_debuginfo_tools {
+ cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string());
+ cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
+ }
+ } else {
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string());
cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
cargo.env("RUSTC_FORCE_UNSTABLE", "1");
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 239316d45c49..95d138b9fab2 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -94,6 +94,7 @@ pub struct Config {
pub rust_debuginfo: bool,
pub rust_debuginfo_lines: bool,
pub rust_debuginfo_only_std: bool,
+ pub rust_debuginfo_tools: bool,
pub rust_rpath: bool,
pub rustc_parallel_queries: bool,
pub rustc_default_linker: Option<String>,
@@ -282,6 +283,7 @@ struct Rust {
debuginfo: Option<bool>,
debuginfo_lines: Option<bool>,
debuginfo_only_std: Option<bool>,
+ debuginfo_tools: Option<bool>,
experimental_parallel_queries: Option<bool>,
debug_jemalloc: Option<bool>,
use_jemalloc: Option<bool>,
@@ -462,6 +464,7 @@ impl Config {
let mut llvm_assertions = None;
let mut debuginfo_lines = None;
let mut debuginfo_only_std = None;
+ let mut debuginfo_tools = None;
let mut debug = None;
let mut debug_jemalloc = None;
let mut debuginfo = None;
@@ -499,6 +502,7 @@ impl Config {
debuginfo = rust.debuginfo;
debuginfo_lines = rust.debuginfo_lines;
debuginfo_only_std = rust.debuginfo_only_std;
+ debuginfo_tools = rust.debuginfo_tools;
optimize = rust.optimize;
ignore_git = rust.ignore_git;
debug_jemalloc = rust.debug_jemalloc;
@@ -582,6 +586,7 @@ impl Config {
};
config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default);
config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default);
+ config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(default);
let default = debug == Some(true);
config.debug_jemalloc = debug_jemalloc.unwrap_or(default);
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index b06968d313ba..a0123da6d8ff 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -79,6 +79,7 @@ o("llvm-release-debuginfo", "llvm.release-debuginfo", "build LLVM with debugger
o("debuginfo", "rust.debuginfo", "build with debugger metadata")
o("debuginfo-lines", "rust.debuginfo-lines", "build with line number debugger metadata")
o("debuginfo-only-std", "rust.debuginfo-only-std", "build only libstd with debugging information")
+o("debuginfo-tools", "rust.debuginfo-tools", "build extended tools with debugging information")
o("debug-jemalloc", "rust.debug-jemalloc", "build jemalloc with --enable-debug --enable-fill")
v("save-toolstates", "rust.save-toolstates", "save build and test status of external tools into this file")
--
2.17.0
From bc7403d067b3e2a154df1ef088377cb2a75f429c Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 13 Apr 2018 21:57:53 -0700
Subject: [PATCH 2/3] Avoid specific claims about debuginfo size
---
config.toml.example | 2 +-
src/bootstrap/builder.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.toml.example b/config.toml.example
index bd18a604a9c8..effe00843810 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -263,7 +263,7 @@
#debuginfo-only-std = false
# Enable debuginfo for the extended tools: cargo, rls, rustfmt
-# Adding debuginfo increases their sizes by a factor of 3-4.
+# Adding debuginfo makes them several times larger.
#debuginfo-tools = false
# Whether or not jemalloc is built and enabled
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index ae19c66d6070..6874efa5a4c7 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -624,7 +624,7 @@ impl<'a> Builder<'a> {
if mode == Mode::Tool {
// Tools like cargo and rls don't get debuginfo by default right now, but this can be
- // enabled in the config. Adding debuginfo increases their sizes by a factor of 3-4.
+ // enabled in the config. Adding debuginfo makes them several times larger.
if self.config.rust_debuginfo_tools {
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string());
cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
--
2.17.0
From 93734e9c46e30acc9a51f19c56511ce8516b6855 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 13 Apr 2018 21:58:21 -0700
Subject: [PATCH 3/3] Make debuginfo-tools always default false
---
src/bootstrap/config.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 95d138b9fab2..1b4b2c5fb2a5 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -586,7 +586,7 @@ impl Config {
};
config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default);
config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default);
- config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(default);
+ config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(false);
let default = debug == Some(true);
config.debug_jemalloc = debug_jemalloc.unwrap_or(default);
--
2.17.0

View File

@ -8,10 +8,11 @@
# 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
%global bootstrap_rust 1.25.0
%global bootstrap_cargo 0.26.0
# Note that cargo matches the program version here, not its crate version.
%global bootstrap_rust 1.26.0
%global bootstrap_cargo 1.26.0
%global bootstrap_channel %{bootstrap_rust}
%global bootstrap_date 2018-03-29
%global bootstrap_date 2018-05-10
# Only the specified arches will use bootstrap binaries.
#global bootstrap_arches %%{rust_arches}
@ -27,12 +28,11 @@
%bcond_with bundled_llvm
%endif
# Some targets don't have libgit2
%if 0%{?rhel} && !0%{?epel}
# libgit2-sys expects to use its bundled library, which is sometimes just a
# snapshot of libgit2's master branch. This can mean the FFI declarations
# won't match our released libgit2.so, e.g. having changed struct fields.
# So, tread carefully if you toggle this...
%bcond_without bundled_libgit2
%else
%bcond_with bundled_libgit2
%endif
# LLDB only works on some architectures
%ifarch %{arm} aarch64 %{ix86} x86_64
@ -49,14 +49,14 @@
# Some sub-packages are versioned independently of the rust compiler and runtime itself.
# Also beware that if any of these are not changed in a version bump, then the release
# number should still increase, not be reset to 1!
%global rustc_version 1.26.2
%global cargo_version 1.26.0
%global rustfmt_version 0.4.2
%global rls_version 0.126.0
%global rustc_version 1.27.0
%global cargo_version 1.27.0
%global rustfmt_version 0.6.1
%global rls_version 0.127.0
Name: rust
Version: %{rustc_version}
Release: 4%{?dist}
Release: 1%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
# ^ written as: (rust itself) and (bundled libraries)
@ -70,12 +70,12 @@ ExclusiveArch: %{rust_arches}
%endif
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# rustbuild: allow building tools with debuginfo
# https://github.com/rust-lang/rust/pull/49959
Patch1: pull-49959.patch
# https://github.com/rust-lang/rust/pull/50789/
Patch2: 0001-Ensure-libraries-built-in-stage0-have-unique-metadat.patch
Patch1: 0001-Ensure-libraries-built-in-stage0-have-unique-metadat.patch
# https://github.com/rust-lang/rust/issues/51650
# https://github.com/rust-lang-nursery/error-chain/pull/247
Patch2: 0001-Fix-new-renamed_and_removed_lints-warning-247.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
@ -151,7 +151,7 @@ BuildRequires: %{python}
BuildRequires: cmake3 >= 3.4.3
Provides: bundled(llvm) = 6.0
%else
BuildRequires: cmake >= 2.8.7
BuildRequires: cmake >= 2.8.11
%if 0%{?epel}
%global llvm llvm5.0
%endif
@ -175,7 +175,6 @@ BuildRequires: procps-ng
BuildRequires: gdb
# TODO: work on unbundling these!
Provides: bundled(jquery) = 2.1.4
Provides: bundled(libbacktrace) = 6.1.0
Provides: bundled(miniz) = 1.16~beta+r1
@ -287,9 +286,9 @@ its standard library.
Summary: Rust's package manager and build tool
Version: %{cargo_version}
%if %with bundled_libgit2
Provides: bundled(libgit2) = 0.26.0
Provides: bundled(libgit2) = 0.27
%else
BuildRequires: pkgconfig(libgit2) >= 0.24
BuildRequires: pkgconfig(libgit2) >= 0.27
%endif
# For tests:
BuildRequires: git
@ -332,7 +331,7 @@ Summary: Rust Language Server for IDE integration
Version: %{rls_version}
Provides: rls = %{rls_version}
%if %with bundled_libgit2
Provides: bundled(libgit2) = 0.26.0
Provides: bundled(libgit2) = 0.27
%endif
Requires: rust-analysis
# /usr/bin/rls is dynamically linked against internal rustc libs
@ -377,7 +376,10 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package}
%patch1 -p1
pushd src/vendor/error-chain
%patch2 -p1
popd
%if "%{python}" == "python3"
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
@ -648,6 +650,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
%changelog
* Thu Jun 21 2018 Josh Stone <jistone@redhat.com> - 1.27.0-1
- Update to 1.27.0.
* Tue Jun 05 2018 Josh Stone <jistone@redhat.com> - 1.26.2-4
- Rebuild without bootstrap binaries.

View File

@ -1 +1 @@
SHA512 (rustc-1.26.2-src.tar.xz) = a598858ddce0e05d1d431be383400f44fc551eb2e368f37b01670c0b65ea5da6a7d5b2b68bb6ef806d2107cfa0d5007008442ad4d5ddb17d18d04e0ab31600b0
SHA512 (rustc-1.27.0-src.tar.xz) = b80af48c637741add1d2846e6e3153b0125fb22ed587036fb9d27ad3961419af64802aa91a79258277b1be20718281558989ea0283db0c482fe1512354ba79d8

View File

@ -1,8 +1,8 @@
SHA512 (rustc-1.26.2-src.tar.xz) = a598858ddce0e05d1d431be383400f44fc551eb2e368f37b01670c0b65ea5da6a7d5b2b68bb6ef806d2107cfa0d5007008442ad4d5ddb17d18d04e0ab31600b0
SHA512 (rust-1.25.0-aarch64-unknown-linux-gnu.tar.xz) = 404ecd4dc1e49fba41d7ade947877f621aa762e43eb5a8f604823fe297e8023f095cd449610240ed235723baaac96064eb38445794e27708edcdbca998d939e3
SHA512 (rust-1.25.0-armv7-unknown-linux-gnueabihf.tar.xz) = 63bf72c6011f9ccb052496d09d1ecc37d5c2ec8260ade2ef9b7bca6fb0dc8b77f5d27eb77c1136cef6f986f2fec90577399b0f9c57e757838904ab4030f93f6d
SHA512 (rust-1.25.0-i686-unknown-linux-gnu.tar.xz) = 75ad5cb5e00fabc24aaa46236cc6f2193a7543fd0944c0717c11a56d9c420d20463ad683558d86f5d42abacfb89d15f9cabf404c912a5e24a28e6716c8003e8f
SHA512 (rust-1.25.0-powerpc64le-unknown-linux-gnu.tar.xz) = f4a37b82a8cd2a9a50d6cc7db0b09513829388e72ab13e8b6d633a166c9f15fd3692d06131e8546636e9e6a8b7dae93345d063f88d64ab876da582d7156ebdee
SHA512 (rust-1.25.0-powerpc64-unknown-linux-gnu.tar.xz) = 853c7a009c2b5a80d625bad024faa92193041461213761a9d4bdf33d5bb958c4f81b966cb8af1a5abbde6d393650f74c6a18a5ba9f709bce04d0da4f0e15ee7a
SHA512 (rust-1.25.0-s390x-unknown-linux-gnu.tar.xz) = 864919cf590377f47c6fb11dec3f0b9999ca5db3c002d3f253efbb7ad268e5f0a7d6f590411fed14c2068f08fb100ae76c33a5165f689d98b0798e227cf22632
SHA512 (rust-1.25.0-x86_64-unknown-linux-gnu.tar.xz) = aea93ff64f620a1dd6b48d07ec3dcbc126b2f5c17b4697c096ec8cd02a3c7dfec7ae7d5df70a55eceb372897ad12f3d01c67d5aaea0167a80270931c61323f78
SHA512 (rustc-1.27.0-src.tar.xz) = b80af48c637741add1d2846e6e3153b0125fb22ed587036fb9d27ad3961419af64802aa91a79258277b1be20718281558989ea0283db0c482fe1512354ba79d8
SHA512 (rust-1.26.0-aarch64-unknown-linux-gnu.tar.xz) = 731e1db2e39d412997cee3d8d51a9d45a84e7092f1c66524f311f4967f7638964581a8c71a5937a7f80a8e0bae153298a6a806e56e525015ab7caf7b040b14b7
SHA512 (rust-1.26.0-armv7-unknown-linux-gnueabihf.tar.xz) = 5766dbba6f4faae3e8dfd1d98ea948e3835d5b1c28b8daf6c734afd7f27301aa857147eb28762462f77c9da539aae2a81319f194154245abd5cdae7067f24d6c
SHA512 (rust-1.26.0-i686-unknown-linux-gnu.tar.xz) = 1257f9edefc49ee1742c3acd666d15f077c4d999a82dfe0d574df5c41981c3f716adf86b23d96cf9a6757508aea92abcbe06ad9e3bec2cb4ac19512d60ebba31
SHA512 (rust-1.26.0-powerpc64le-unknown-linux-gnu.tar.xz) = 9b856967cb94e3d930877d9b28bd9ae2e223a15a15231315f02bfd9c47ad488461b1a55458a6e3f1c9c9a8367c0c3af5ff1dc19d29f3b3debe9baaf2e1b64701
SHA512 (rust-1.26.0-powerpc64-unknown-linux-gnu.tar.xz) = 62e8acd65b9e56e3d3cc46c5d9984b9c80ef83d7204c3f87dbce9a1229ef19db39ed14154fda4416c1656103f82e106b19ba709943d94d408e11283470a94908
SHA512 (rust-1.26.0-s390x-unknown-linux-gnu.tar.xz) = f78b8be5c7a2c1c07527959c4c57cfb0fc43ef79fa313eb8c1afd1fc024753fac17f0001f930b651035c1e704ee391d822ddf588a242dc75cc476b3f20dea682
SHA512 (rust-1.26.0-x86_64-unknown-linux-gnu.tar.xz) = 457503fea324251a92f25d0d45f1e2ac7d342a6a8f52d1abe93a579c7ae9b7f453a707d353e82614b37790747e8551f9762188ee25ff883495598cbf17b3f97e