Update to 1.24.1.

This commit is contained in:
Josh Stone 2018-03-01 17:32:55 -08:00
parent c25b6ed664
commit 1bb4d24c06
5 changed files with 8 additions and 123 deletions

1
.gitignore vendored
View File

@ -105,3 +105,4 @@
/rust-1.23.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.23.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.23.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.24.1-src.tar.xz

View File

@ -1,115 +0,0 @@
From b445a52ea322758fb7b60fab5f890ef8c0f8df9c Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Tue, 2 Jan 2018 16:21:35 -0800
Subject: [PATCH] rustc: Don't use relative paths for extended errors
These no longer work now that Cargo changes the cwd of rustc while it's running.
Instead use an absolute path that's set by rustbuild.
---
src/bootstrap/builder.rs | 4 ++--
src/bootstrap/check.rs | 3 ++-
src/bootstrap/doc.rs | 3 ++-
src/bootstrap/lib.rs | 5 +++++
src/libsyntax/diagnostics/metadata.rs | 11 ++++++-----
5 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 16de31406f84..ce30d1f4cec4 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -484,8 +484,8 @@ impl<'a> Builder<'a> {
} else {
PathBuf::from("/path/to/nowhere/rustdoc/not/required")
})
- .env("TEST_MIRI", self.config.test_miri.to_string());
-
+ .env("TEST_MIRI", self.config.test_miri.to_string())
+ .env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir());
if let Some(n) = self.config.rust_codegen_units {
cargo.env("RUSTC_CODEGEN_UNITS", n.to_string());
}
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index 48b3d356985c..e4fbae3ff0d8 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -980,7 +980,8 @@ impl Step for ErrorIndex {
build.run(builder.tool_cmd(Tool::ErrorIndex)
.arg("markdown")
.arg(&output)
- .env("CFG_BUILD", &build.build));
+ .env("CFG_BUILD", &build.build)
+ .env("RUSTC_ERROR_METADATA_DST", build.extended_error_dir()));
markdown_test(builder, compiler, &output);
}
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 3c12cfc4c7ff..832da24c994d 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -671,7 +671,8 @@ impl Step for ErrorIndex {
index.arg(out.join("error-index.html"));
// FIXME: shouldn't have to pass this env var
- index.env("CFG_BUILD", &build.build);
+ index.env("CFG_BUILD", &build.build)
+ .env("RUSTC_ERROR_METADATA_DST", build.extended_error_dir());
build.run(&mut index);
}
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 63a9c3ab905d..52767b403e4e 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -721,6 +721,11 @@ impl Build {
self.config.python.as_ref().unwrap()
}
+ /// Temporary directory that extended error information is emitted to.
+ fn extended_error_dir(&self) -> PathBuf {
+ self.out.join("tmp/extended-error-metadata")
+ }
+
/// Tests whether the `compiler` compiling for `target` should be forced to
/// use a stage1 compiler instead.
///
diff --git a/src/libsyntax/diagnostics/metadata.rs b/src/libsyntax/diagnostics/metadata.rs
index 5f06475919fe..dc01a79190b3 100644
--- a/src/libsyntax/diagnostics/metadata.rs
+++ b/src/libsyntax/diagnostics/metadata.rs
@@ -14,9 +14,10 @@
//! currently always a crate name.
use std::collections::BTreeMap;
-use std::path::PathBuf;
+use std::env;
use std::fs::{remove_file, create_dir_all, File};
use std::io::Write;
+use std::path::PathBuf;
use std::error::Error;
use rustc_serialize::json::as_json;
@@ -24,9 +25,6 @@ use syntax_pos::{Span, FileName};
use ext::base::ExtCtxt;
use diagnostics::plugin::{ErrorMap, ErrorInfo};
-// Default metadata directory to use for extended error JSON.
-const ERROR_METADATA_PREFIX: &'static str = "tmp/extended-errors";
-
/// JSON encodable/decodable version of `ErrorInfo`.
#[derive(PartialEq, RustcDecodable, RustcEncodable)]
pub struct ErrorMetadata {
@@ -59,7 +57,10 @@ impl ErrorLocation {
///
/// See `output_metadata`.
pub fn get_metadata_dir(prefix: &str) -> PathBuf {
- PathBuf::from(ERROR_METADATA_PREFIX).join(prefix)
+ env::var_os("RUSTC_ERROR_METADATA_DST")
+ .map(PathBuf::from)
+ .expect("env var `RUSTC_ERROR_METADATA_DST` isn't set")
+ .join(prefix)
}
/// Map `name` to a path in the given directory: <directory>/<name>.json
--
2.14.3

View File

@ -47,8 +47,8 @@
Name: rust
Version: 1.24.0
Release: 3%{?dist}
Version: 1.24.1
Release: 1%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and ISC and MIT)
# ^ written as: (rust itself) and (bundled libraries)
@ -83,9 +83,6 @@ Patch6: 0002-Use-a-range-to-identify-SIGSEGV-in-stack-guards.patch
Patch7: rust-pr46592-bootstrap-libdir.patch
Patch8: rust-pr48362-libdir-relative.patch
# https://github.com/rust-lang/rust/issues/48308
Patch9: 0001-rustc-Don-t-use-relative-paths-for-extended-errors.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
local abi = "gnu"
@ -320,7 +317,6 @@ popd
%patch6 -p1 -b .out-of-stack
%patch7 -p1 -b .bootstrap-libdir
%patch8 -p1 -b .bootstrap-libdir-relative
%patch9 -p1 -b .absolute-extended-errors
%if "%{python}" == "python3"
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
@ -522,6 +518,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
%changelog
* Thu Mar 01 2018 Josh Stone <jistone@redhat.com> - 1.24.1-1
- Update to 1.24.1.
* Wed Feb 21 2018 Josh Stone <jistone@redhat.com> - 1.24.0-3
- Backport a rebuild fix for rust#48308.

View File

@ -1 +1 @@
SHA512 (rustc-1.24.0-src.tar.xz) = 211d9651fecb2772e626eba8fe91f9b05d1f3b732f01d00fb752016dac5f92da7abd3a98212bb439386de55c37873d2d2773f4ecfa071f46e45745f4b69f9eac
SHA512 (rustc-1.24.1-src.tar.xz) = 5f1fa594f55278f512b70af1f0e5a5ac377cab23ea7fb12d4f4982b5424f993a1f53bbfca28af8168d19ff95b56e107aaa0f684ecaa3264195a274cc5b10caf6

View File

@ -1,4 +1,4 @@
SHA512 (rustc-1.24.0-src.tar.xz) = 211d9651fecb2772e626eba8fe91f9b05d1f3b732f01d00fb752016dac5f92da7abd3a98212bb439386de55c37873d2d2773f4ecfa071f46e45745f4b69f9eac
SHA512 (rustc-1.24.1-src.tar.xz) = 5f1fa594f55278f512b70af1f0e5a5ac377cab23ea7fb12d4f4982b5424f993a1f53bbfca28af8168d19ff95b56e107aaa0f684ecaa3264195a274cc5b10caf6
SHA512 (rust-1.23.0-aarch64-unknown-linux-gnu.tar.xz) = 1d0fbf800a5ede9101570507d6cca4ef79445f2df3ace194ce74702eb507d7de5fe7f4a30dd5e5561faa2bfa205c237dee98eca6eefc8b652d21c0c373099ca6
SHA512 (rust-1.23.0-armv7-unknown-linux-gnueabihf.tar.xz) = 2ef07187d78060005e99676cf1f168e7a8861e9f104c95056cfe8784a7fa35b14f0b69ba4adc8be4173ef8d4ce7554f92487385a09602343ab65fcf749fbe35c
SHA512 (rust-1.23.0-i686-unknown-linux-gnu.tar.xz) = 6863a512100ae0369d0a5c4242d45fda9b83a2ad6c3e6691f4f0d1e071dca7003c55873cc03a9d09305adae24667e654bda66a8ad3246f4df2d7a2fc0fc4d7a7