Update to 1.19.0.
This commit is contained in:
parent
96a6a3452a
commit
6d4fd15349
8
.gitignore
vendored
8
.gitignore
vendored
@ -57,3 +57,11 @@
|
|||||||
/rust-1.17.0-powerpc64-unknown-linux-gnu.tar.gz
|
/rust-1.17.0-powerpc64-unknown-linux-gnu.tar.gz
|
||||||
/rust-1.17.0-s390x-unknown-linux-gnu.tar.gz
|
/rust-1.17.0-s390x-unknown-linux-gnu.tar.gz
|
||||||
/rust-1.17.0-x86_64-unknown-linux-gnu.tar.gz
|
/rust-1.17.0-x86_64-unknown-linux-gnu.tar.gz
|
||||||
|
/rustc-1.19.0-src.tar.xz
|
||||||
|
/rust-1.18.0-aarch64-unknown-linux-gnu.tar.gz
|
||||||
|
/rust-1.18.0-armv7-unknown-linux-gnueabihf.tar.gz
|
||||||
|
/rust-1.18.0-i686-unknown-linux-gnu.tar.gz
|
||||||
|
/rust-1.18.0-powerpc64le-unknown-linux-gnu.tar.gz
|
||||||
|
/rust-1.18.0-powerpc64-unknown-linux-gnu.tar.gz
|
||||||
|
/rust-1.18.0-s390x-unknown-linux-gnu.tar.gz
|
||||||
|
/rust-1.18.0-x86_64-unknown-linux-gnu.tar.gz
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
diff --git a/configure b/configure
|
|
||||||
index 505767cede55..4074a1e2f765 100755
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -753,8 +753,8 @@ case "$CFG_RELEASE_CHANNEL" in
|
|
||||||
*-pc-windows-gnu)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
- CFG_ENABLE_DEBUGINFO_LINES=1
|
|
||||||
- CFG_ENABLE_DEBUGINFO_ONLY_STD=1
|
|
||||||
+ # CFG_ENABLE_DEBUGINFO_LINES=1
|
|
||||||
+ # CFG_ENABLE_DEBUGINFO_ONLY_STD=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
@@ -765,8 +765,8 @@ case "$CFG_RELEASE_CHANNEL" in
|
|
||||||
*-pc-windows-gnu)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
- CFG_ENABLE_DEBUGINFO_LINES=1
|
|
||||||
- CFG_ENABLE_DEBUGINFO_ONLY_STD=1
|
|
||||||
+ # CFG_ENABLE_DEBUGINFO_LINES=1
|
|
||||||
+ # CFG_ENABLE_DEBUGINFO_ONLY_STD=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
@ -1,368 +0,0 @@
|
|||||||
From 9d8fc50c4a989c934f9473e28022b86a07556dca Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Stone <jistone@redhat.com>
|
|
||||||
Date: Tue, 6 Jun 2017 12:59:04 -0700
|
|
||||||
Subject: [PATCH] rustbuild: Add `./x.py test --no-fail-fast`
|
|
||||||
|
|
||||||
This option forwards to each `cargo test` invocation, and applies the
|
|
||||||
same logic across all test steps to keep going after failures. At the
|
|
||||||
end, a brief summary line reports how many commands failed, if any.
|
|
||||||
|
|
||||||
Note that if a test program fails to even start at all, or if an
|
|
||||||
auxiliary build command related to testing fails, these are still left
|
|
||||||
to stop everything right away.
|
|
||||||
|
|
||||||
Fixes #40219.
|
|
||||||
---
|
|
||||||
src/bootstrap/check.rs | 53 ++++++++++++++++++++++++++++++++++++++-----------
|
|
||||||
src/bootstrap/flags.rs | 14 ++++++++++++-
|
|
||||||
src/bootstrap/lib.rs | 22 +++++++++++++++++++-
|
|
||||||
src/bootstrap/step.rs | 12 +++++++++--
|
|
||||||
src/build_helper/lib.rs | 38 ++++++++++++++++++++++++-----------
|
|
||||||
5 files changed, 111 insertions(+), 28 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
|
|
||||||
index f8f641060c44..f39a7ba61213 100644
|
|
||||||
--- a/src/bootstrap/check.rs
|
|
||||||
+++ b/src/bootstrap/check.rs
|
|
||||||
@@ -58,6 +58,29 @@ impl fmt::Display for TestKind {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+fn try_run(build: &Build, cmd: &mut Command) {
|
|
||||||
+ if build.flags.cmd.no_fail_fast() {
|
|
||||||
+ if !build.try_run(cmd) {
|
|
||||||
+ let failures = build.delayed_failures.get();
|
|
||||||
+ build.delayed_failures.set(failures + 1);
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ build.run(cmd);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#[allow(unused)]
|
|
||||||
+fn try_run_quiet(build: &Build, cmd: &mut Command) {
|
|
||||||
+ if build.flags.cmd.no_fail_fast() {
|
|
||||||
+ if !build.try_run_quiet(cmd) {
|
|
||||||
+ let failures = build.delayed_failures.get();
|
|
||||||
+ build.delayed_failures.set(failures + 1);
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ build.run_quiet(cmd);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/// Runs the `linkchecker` tool as compiled in `stage` by the `host` compiler.
|
|
||||||
///
|
|
||||||
/// This tool in `src/tools` will verify the validity of all our links in the
|
|
||||||
@@ -67,8 +90,8 @@ pub fn linkcheck(build: &Build, host: &str) {
|
|
||||||
let compiler = Compiler::new(0, host);
|
|
||||||
|
|
||||||
let _time = util::timeit();
|
|
||||||
- build.run(build.tool_cmd(&compiler, "linkchecker")
|
|
||||||
- .arg(build.out.join(host).join("doc")));
|
|
||||||
+ try_run(build, build.tool_cmd(&compiler, "linkchecker")
|
|
||||||
+ .arg(build.out.join(host).join("doc")));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Runs the `cargotest` tool as compiled in `stage` by the `host` compiler.
|
|
||||||
@@ -95,9 +118,9 @@ pub fn cargotest(build: &Build, stage: u32, host: &str) {
|
|
||||||
let _time = util::timeit();
|
|
||||||
let mut cmd = Command::new(build.tool(&Compiler::new(0, host), "cargotest"));
|
|
||||||
build.prepare_tool_cmd(compiler, &mut cmd);
|
|
||||||
- build.run(cmd.env("PATH", newpath)
|
|
||||||
- .arg(&build.cargo)
|
|
||||||
- .arg(&out_dir));
|
|
||||||
+ try_run(build, cmd.env("PATH", newpath)
|
|
||||||
+ .arg(&build.cargo)
|
|
||||||
+ .arg(&out_dir));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Runs the `tidy` tool as compiled in `stage` by the `host` compiler.
|
|
||||||
@@ -113,7 +136,7 @@ pub fn tidy(build: &Build, host: &str) {
|
|
||||||
if !build.config.vendor {
|
|
||||||
cmd.arg("--no-vendor");
|
|
||||||
}
|
|
||||||
- build.run(&mut cmd);
|
|
||||||
+ try_run(build, &mut cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn testdir(build: &Build, host: &str) -> PathBuf {
|
|
||||||
@@ -261,7 +284,7 @@ pub fn compiletest(build: &Build,
|
|
||||||
}
|
|
||||||
|
|
||||||
let _time = util::timeit();
|
|
||||||
- build.run(&mut cmd);
|
|
||||||
+ try_run(build, &mut cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Run `rustdoc --test` for all documentation in `src/doc`.
|
|
||||||
@@ -337,7 +360,7 @@ fn markdown_test(build: &Build, compiler: &Compiler, markdown: &Path) {
|
|
||||||
}
|
|
||||||
cmd.arg("--test-args").arg(test_args);
|
|
||||||
|
|
||||||
- build.run(&mut cmd);
|
|
||||||
+ try_run(build, &mut cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Run all unit tests plus documentation tests for an entire crate DAG defined
|
|
||||||
@@ -388,6 +411,9 @@ pub fn krate(build: &Build,
|
|
||||||
cargo.arg("--manifest-path")
|
|
||||||
.arg(build.src.join(path).join("Cargo.toml"))
|
|
||||||
.arg("--features").arg(features);
|
|
||||||
+ if test_kind.subcommand() == "test" && build.flags.cmd.no_fail_fast() {
|
|
||||||
+ cargo.arg("--no-fail-fast");
|
|
||||||
+ }
|
|
||||||
|
|
||||||
match krate {
|
|
||||||
Some(krate) => {
|
|
||||||
@@ -452,7 +478,7 @@ pub fn krate(build: &Build,
|
|
||||||
krate_qemu(build, &compiler, target, mode);
|
|
||||||
} else {
|
|
||||||
cargo.args(&build.flags.cmd.test_args());
|
|
||||||
- build.run(&mut cargo);
|
|
||||||
+ try_run(build, &mut cargo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -521,7 +547,7 @@ fn krate_emscripten(build: &Build,
|
|
||||||
if build.config.quiet_tests {
|
|
||||||
cmd.arg("--quiet");
|
|
||||||
}
|
|
||||||
- build.run(&mut cmd);
|
|
||||||
+ try_run(build, &mut cmd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -544,7 +570,7 @@ fn krate_qemu(build: &Build,
|
|
||||||
cmd.arg("--quiet");
|
|
||||||
}
|
|
||||||
cmd.args(&build.flags.cmd.test_args());
|
|
||||||
- build.run(&mut cmd);
|
|
||||||
+ try_run(build, &mut cmd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -671,6 +697,9 @@ pub fn bootstrap(build: &Build) {
|
|
||||||
.current_dir(build.src.join("src/bootstrap"))
|
|
||||||
.env("CARGO_TARGET_DIR", build.out.join("bootstrap"))
|
|
||||||
.env("RUSTC", &build.rustc);
|
|
||||||
+ if build.flags.cmd.no_fail_fast() {
|
|
||||||
+ cmd.arg("--no-fail-fast");
|
|
||||||
+ }
|
|
||||||
cmd.arg("--").args(&build.flags.cmd.test_args());
|
|
||||||
- build.run(&mut cmd);
|
|
||||||
+ try_run(build, &mut cmd);
|
|
||||||
}
|
|
||||||
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs
|
|
||||||
index a1466d68a135..1ed759d24c54 100644
|
|
||||||
--- a/src/bootstrap/flags.rs
|
|
||||||
+++ b/src/bootstrap/flags.rs
|
|
||||||
@@ -61,6 +61,7 @@ pub enum Subcommand {
|
|
||||||
Test {
|
|
||||||
paths: Vec<PathBuf>,
|
|
||||||
test_args: Vec<String>,
|
|
||||||
+ no_fail_fast: bool,
|
|
||||||
},
|
|
||||||
Bench {
|
|
||||||
paths: Vec<PathBuf>,
|
|
||||||
@@ -137,7 +138,10 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
|
|
||||||
|
|
||||||
// Some subcommands get extra options
|
|
||||||
match subcommand.as_str() {
|
|
||||||
- "test" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); },
|
|
||||||
+ "test" => {
|
|
||||||
+ opts.optflag("", "no-fail-fast", "Run all tests regardless of failure");
|
|
||||||
+ opts.optmulti("", "test-args", "extra arguments", "ARGS");
|
|
||||||
+ },
|
|
||||||
"bench" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); },
|
|
||||||
"dist" => { opts.optflag("", "install", "run installer as well"); },
|
|
||||||
_ => { },
|
|
||||||
@@ -260,6 +264,7 @@ Arguments:
|
|
||||||
Subcommand::Test {
|
|
||||||
paths: paths,
|
|
||||||
test_args: matches.opt_strs("test-args"),
|
|
||||||
+ no_fail_fast: matches.opt_present("no-fail-fast"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"bench" => {
|
|
||||||
@@ -335,6 +340,13 @@ impl Subcommand {
|
|
||||||
_ => Vec::new(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ pub fn no_fail_fast(&self) -> bool {
|
|
||||||
+ match *self {
|
|
||||||
+ Subcommand::Test { no_fail_fast, .. } => no_fail_fast,
|
|
||||||
+ _ => false,
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
fn split(s: Vec<String>) -> Vec<String> {
|
|
||||||
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
|
|
||||||
index 5e046f41673e..d2303c96d201 100644
|
|
||||||
--- a/src/bootstrap/lib.rs
|
|
||||||
+++ b/src/bootstrap/lib.rs
|
|
||||||
@@ -76,6 +76,7 @@ extern crate num_cpus;
|
|
||||||
extern crate rustc_serialize;
|
|
||||||
extern crate toml;
|
|
||||||
|
|
||||||
+use std::cell::Cell;
|
|
||||||
use std::cmp;
|
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::env;
|
|
||||||
@@ -85,7 +86,7 @@ use std::io::Read;
|
|
||||||
use std::path::{Component, PathBuf, Path};
|
|
||||||
use std::process::Command;
|
|
||||||
|
|
||||||
-use build_helper::{run_silent, run_suppressed, output, mtime};
|
|
||||||
+use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime};
|
|
||||||
|
|
||||||
use util::{exe, libdir, add_lib_path};
|
|
||||||
|
|
||||||
@@ -164,6 +165,7 @@ pub struct Build {
|
|
||||||
crates: HashMap<String, Crate>,
|
|
||||||
is_sudo: bool,
|
|
||||||
src_is_git: bool,
|
|
||||||
+ delayed_failures: Cell<usize>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
@@ -257,6 +259,7 @@ impl Build {
|
|
||||||
lldb_python_dir: None,
|
|
||||||
is_sudo: is_sudo,
|
|
||||||
src_is_git: src_is_git,
|
|
||||||
+ delayed_failures: Cell::new(0),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -847,6 +850,23 @@ impl Build {
|
|
||||||
run_suppressed(cmd)
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /// Runs a command, printing out nice contextual information if it fails.
|
|
||||||
+ /// Exits if the command failed to execute at all, otherwise returns its
|
|
||||||
+ /// `status.success()`.
|
|
||||||
+ fn try_run(&self, cmd: &mut Command) -> bool {
|
|
||||||
+ self.verbose(&format!("running: {:?}", cmd));
|
|
||||||
+ try_run_silent(cmd)
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /// Runs a command, printing out nice contextual information if it fails.
|
|
||||||
+ /// Exits if the command failed to execute at all, otherwise returns its
|
|
||||||
+ /// `status.success()`.
|
|
||||||
+ #[allow(unused)]
|
|
||||||
+ fn try_run_quiet(&self, cmd: &mut Command) -> bool {
|
|
||||||
+ self.verbose(&format!("running: {:?}", cmd));
|
|
||||||
+ try_run_suppressed(cmd)
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/// Prints a message if this build is configured in verbose mode.
|
|
||||||
fn verbose(&self, msg: &str) {
|
|
||||||
if self.flags.verbose() || self.config.verbose() {
|
|
||||||
diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs
|
|
||||||
index 17902a39df1e..f0522035127c 100644
|
|
||||||
--- a/src/bootstrap/step.rs
|
|
||||||
+++ b/src/bootstrap/step.rs
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
|
|
||||||
use std::collections::{BTreeMap, HashSet, HashMap};
|
|
||||||
use std::mem;
|
|
||||||
+use std::process;
|
|
||||||
|
|
||||||
use check::{self, TestKind};
|
|
||||||
use compile;
|
|
||||||
@@ -1092,8 +1093,8 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
|
|
||||||
let (kind, paths) = match self.build.flags.cmd {
|
|
||||||
Subcommand::Build { ref paths } => (Kind::Build, &paths[..]),
|
|
||||||
Subcommand::Doc { ref paths } => (Kind::Doc, &paths[..]),
|
|
||||||
- Subcommand::Test { ref paths, test_args: _ } => (Kind::Test, &paths[..]),
|
|
||||||
- Subcommand::Bench { ref paths, test_args: _ } => (Kind::Bench, &paths[..]),
|
|
||||||
+ Subcommand::Test { ref paths, .. } => (Kind::Test, &paths[..]),
|
|
||||||
+ Subcommand::Bench { ref paths, .. } => (Kind::Bench, &paths[..]),
|
|
||||||
Subcommand::Dist { ref paths, install } => {
|
|
||||||
if install {
|
|
||||||
return vec![self.sbuild.name("install")]
|
|
||||||
@@ -1191,6 +1192,13 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
|
|
||||||
self.build.verbose(&format!("executing step {:?}", step));
|
|
||||||
(self.rules[step.name].run)(step);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // Check for postponed failures from `test --no-fail-fast`.
|
|
||||||
+ let failures = self.build.delayed_failures.get();
|
|
||||||
+ if failures > 0 {
|
|
||||||
+ println!("\n{} command(s) did not execute successfully.\n", failures);
|
|
||||||
+ process::exit(1);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// From the top level targets `steps` generate a topological ordering of
|
|
||||||
diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs
|
|
||||||
index cb58a916fb79..10b0f19d6274 100644
|
|
||||||
--- a/src/build_helper/lib.rs
|
|
||||||
+++ b/src/build_helper/lib.rs
|
|
||||||
@@ -42,35 +42,49 @@ pub fn run(cmd: &mut Command) {
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn run_silent(cmd: &mut Command) {
|
|
||||||
+ if !try_run_silent(cmd) {
|
|
||||||
+ std::process::exit(1);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+pub fn try_run_silent(cmd: &mut Command) -> bool {
|
|
||||||
let status = match cmd.status() {
|
|
||||||
Ok(status) => status,
|
|
||||||
Err(e) => fail(&format!("failed to execute command: {:?}\nerror: {}",
|
|
||||||
cmd, e)),
|
|
||||||
};
|
|
||||||
if !status.success() {
|
|
||||||
- fail(&format!("command did not execute successfully: {:?}\n\
|
|
||||||
- expected success, got: {}",
|
|
||||||
- cmd,
|
|
||||||
- status));
|
|
||||||
+ println!("\n\ncommand did not execute successfully: {:?}\n\
|
|
||||||
+ expected success, got: {}\n\n",
|
|
||||||
+ cmd,
|
|
||||||
+ status);
|
|
||||||
}
|
|
||||||
+ status.success()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn run_suppressed(cmd: &mut Command) {
|
|
||||||
+ if !try_run_suppressed(cmd) {
|
|
||||||
+ std::process::exit(1);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+pub fn try_run_suppressed(cmd: &mut Command) -> bool {
|
|
||||||
let output = match cmd.output() {
|
|
||||||
Ok(status) => status,
|
|
||||||
Err(e) => fail(&format!("failed to execute command: {:?}\nerror: {}",
|
|
||||||
cmd, e)),
|
|
||||||
};
|
|
||||||
if !output.status.success() {
|
|
||||||
- fail(&format!("command did not execute successfully: {:?}\n\
|
|
||||||
- expected success, got: {}\n\n\
|
|
||||||
- stdout ----\n{}\n\
|
|
||||||
- stderr ----\n{}\n",
|
|
||||||
- cmd,
|
|
||||||
- output.status,
|
|
||||||
- String::from_utf8_lossy(&output.stdout),
|
|
||||||
- String::from_utf8_lossy(&output.stderr)));
|
|
||||||
+ println!("\n\ncommand did not execute successfully: {:?}\n\
|
|
||||||
+ expected success, got: {}\n\n\
|
|
||||||
+ stdout ----\n{}\n\
|
|
||||||
+ stderr ----\n{}\n\n",
|
|
||||||
+ cmd,
|
|
||||||
+ output.status,
|
|
||||||
+ String::from_utf8_lossy(&output.stdout),
|
|
||||||
+ String::from_utf8_lossy(&output.stderr));
|
|
||||||
}
|
|
||||||
+ output.status.success()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn gnu_target(target: &str) -> String {
|
|
||||||
--
|
|
||||||
2.13.0
|
|
||||||
|
|
80
rust-1.19.0-43072-stack-guard.patch
Normal file
80
rust-1.19.0-43072-stack-guard.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From 1d5e3cd80b66a3abd274107e75854476c603617d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josh Stone <jistone@redhat.com>
|
||||||
|
Date: Wed, 5 Jul 2017 12:03:17 -0700
|
||||||
|
Subject: [PATCH] Skip the main thread's manual stack guard on Linux
|
||||||
|
|
||||||
|
Linux doesn't allocate the whole stack right away, and the kernel has
|
||||||
|
its own stack-guard mechanism to fault when growing too close to an
|
||||||
|
existing mapping. If we map our own guard, then the kernel starts
|
||||||
|
enforcing a rather large gap above that, rendering much of the possible
|
||||||
|
stack space useless.
|
||||||
|
|
||||||
|
Instead, we'll just note where we expect rlimit to start faulting, so
|
||||||
|
our handler can report "stack overflow", and trust that the kernel's own
|
||||||
|
stack guard will work.
|
||||||
|
|
||||||
|
Fixes #43052.
|
||||||
|
---
|
||||||
|
src/libstd/sys/unix/thread.rs | 44 ++++++++++++++++++++++++++++---------------
|
||||||
|
1 file changed, 29 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
|
||||||
|
index 1642baa34d63..15747746611c 100644
|
||||||
|
--- a/src/libstd/sys/unix/thread.rs
|
||||||
|
+++ b/src/libstd/sys/unix/thread.rs
|
||||||
|
@@ -264,23 +264,37 @@ pub mod guard {
|
||||||
|
as *mut libc::c_void;
|
||||||
|
}
|
||||||
|
|
||||||
|
- // Rellocate the last page of the stack.
|
||||||
|
- // This ensures SIGBUS will be raised on
|
||||||
|
- // stack overflow.
|
||||||
|
- let result = mmap(stackaddr, psize, PROT_NONE,
|
||||||
|
- MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
||||||
|
-
|
||||||
|
- if result != stackaddr || result == MAP_FAILED {
|
||||||
|
- panic!("failed to allocate a guard page");
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- let offset = if cfg!(any(target_os = "linux", target_os = "freebsd")) {
|
||||||
|
- 2
|
||||||
|
+ if cfg!(target_os = "linux") {
|
||||||
|
+ // Linux doesn't allocate the whole stack right away, and
|
||||||
|
+ // the kernel has its own stack-guard mechanism to fault
|
||||||
|
+ // when growing too close to an existing mapping. If we map
|
||||||
|
+ // our own guard, then the kernel starts enforcing a rather
|
||||||
|
+ // large gap above that, rendering much of the possible
|
||||||
|
+ // stack space useless. See #43052.
|
||||||
|
+ //
|
||||||
|
+ // Instead, we'll just note where we expect rlimit to start
|
||||||
|
+ // faulting, so our handler can report "stack overflow", and
|
||||||
|
+ // trust that the kernel's own stack guard will work.
|
||||||
|
+ Some(stackaddr as usize)
|
||||||
|
} else {
|
||||||
|
- 1
|
||||||
|
- };
|
||||||
|
+ // Reallocate the last page of the stack.
|
||||||
|
+ // This ensures SIGBUS will be raised on
|
||||||
|
+ // stack overflow.
|
||||||
|
+ let result = mmap(stackaddr, psize, PROT_NONE,
|
||||||
|
+ MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
||||||
|
+
|
||||||
|
+ if result != stackaddr || result == MAP_FAILED {
|
||||||
|
+ panic!("failed to allocate a guard page");
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- Some(stackaddr as usize + offset * psize)
|
||||||
|
+ let offset = if cfg!(target_os = "freebsd") {
|
||||||
|
+ 2
|
||||||
|
+ } else {
|
||||||
|
+ 1
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ Some(stackaddr as usize + offset * psize)
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "solaris")]
|
||||||
|
--
|
||||||
|
2.13.3
|
||||||
|
|
38
rust-1.19.0-43297-configure-debuginfo.patch
Normal file
38
rust-1.19.0-43297-configure-debuginfo.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 253ff9c24f0e11323ae4f173cc620721fb322beb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ximin Luo <infinity0@pwned.gg>
|
||||||
|
Date: Mon, 17 Jul 2017 22:29:09 +0200
|
||||||
|
Subject: [PATCH] configure: allow distros to disable debuginfo-only-std
|
||||||
|
|
||||||
|
---
|
||||||
|
configure | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index af59d5b0bb88..084f5bfdedbc 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -558,8 +558,8 @@ case "$CFG_RELEASE_CHANNEL" in
|
||||||
|
*-pc-windows-gnu)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
- CFG_ENABLE_DEBUGINFO_LINES=1
|
||||||
|
- CFG_ENABLE_DEBUGINFO_ONLY_STD=1
|
||||||
|
+ enable_if_not_disabled debuginfo-lines
|
||||||
|
+ enable_if_not_disabled debuginfo-only-std
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@@ -570,8 +570,8 @@ case "$CFG_RELEASE_CHANNEL" in
|
||||||
|
*-pc-windows-gnu)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
- CFG_ENABLE_DEBUGINFO_LINES=1
|
||||||
|
- CFG_ENABLE_DEBUGINFO_ONLY_STD=1
|
||||||
|
+ enable_if_not_disabled debuginfo-lines
|
||||||
|
+ enable_if_not_disabled debuginfo-only-std
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
--
|
||||||
|
2.13.3
|
||||||
|
|
44
rust.spec
44
rust.spec
@ -8,10 +8,10 @@
|
|||||||
# To bootstrap from scratch, set the channel and date from src/stage0.txt
|
# 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
|
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
|
||||||
# or nightly wants some beta-YYYY-MM-DD
|
# or nightly wants some beta-YYYY-MM-DD
|
||||||
%global bootstrap_rust 1.17.0
|
%global bootstrap_rust 1.18.0
|
||||||
%global bootstrap_cargo 0.18.0
|
%global bootstrap_cargo 0.19.0
|
||||||
%global bootstrap_channel %{bootstrap_rust}
|
%global bootstrap_channel %{bootstrap_rust}
|
||||||
%global bootstrap_date 2017-04-27
|
%global bootstrap_date 2017-06-08
|
||||||
|
|
||||||
# Only the specified arches will use bootstrap binaries.
|
# Only the specified arches will use bootstrap binaries.
|
||||||
#global bootstrap_arches %%{rust_arches}
|
#global bootstrap_arches %%{rust_arches}
|
||||||
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.18.0
|
Version: 1.19.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Rust Programming Language
|
Summary: The Rust Programming Language
|
||||||
License: (ASL 2.0 or MIT) and (BSD and ISC and MIT)
|
License: (ASL 2.0 or MIT) and (BSD and ISC and MIT)
|
||||||
@ -60,13 +60,10 @@ ExclusiveArch: %{rust_arches}
|
|||||||
%else
|
%else
|
||||||
%global rustc_package rustc-%{channel}-src
|
%global rustc_package rustc-%{channel}-src
|
||||||
%endif
|
%endif
|
||||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.gz
|
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||||
|
|
||||||
# Don't let configure clobber our debuginfo choice for stable releases.
|
Patch1: rust-1.19.0-43072-stack-guard.patch
|
||||||
Patch1: rust-1.16.0-configure-no-override.patch
|
Patch2: rust-1.19.0-43297-configure-debuginfo.patch
|
||||||
|
|
||||||
# Backport rust#42363 to run all tests
|
|
||||||
Patch2: rust-1.18.0-no-fail-fast.patch
|
|
||||||
|
|
||||||
# Get the Rust triple for any arch.
|
# Get the Rust triple for any arch.
|
||||||
%{lua: function rust_triple(arch)
|
%{lua: function rust_triple(arch)
|
||||||
@ -128,7 +125,7 @@ BuildRequires: curl
|
|||||||
BuildRequires: cmake3
|
BuildRequires: cmake3
|
||||||
Provides: bundled(llvm) = 3.9
|
Provides: bundled(llvm) = 3.9
|
||||||
%else
|
%else
|
||||||
%if 0%{?fedora} >= 26 || 0%{?epel}
|
%if 0%{?epel}
|
||||||
%global llvm llvm3.9
|
%global llvm llvm3.9
|
||||||
%global llvm_root %{_libdir}/%{llvm}
|
%global llvm_root %{_libdir}/%{llvm}
|
||||||
%else
|
%else
|
||||||
@ -286,6 +283,11 @@ sed -i.jemalloc -e '1i // ignore-test jemalloc is disabled' \
|
|||||||
src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs \
|
src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs \
|
||||||
src/test/run-pass/allocator-default.rs
|
src/test/run-pass/allocator-default.rs
|
||||||
|
|
||||||
|
# This tests a problem of exponential growth, which seems to be less-reliably
|
||||||
|
# fixed when running on older LLVM and/or some arches. Just skip it for now.
|
||||||
|
sed -i.ignore -e '1i // ignore-test may still be exponential...' \
|
||||||
|
src/test/run-pass/issue-41696.rs
|
||||||
|
|
||||||
%if %{with bundled_llvm} && 0%{?epel}
|
%if %{with bundled_llvm} && 0%{?epel}
|
||||||
mkdir -p cmake-bin
|
mkdir -p cmake-bin
|
||||||
ln -s /usr/bin/cmake3 cmake-bin/cmake
|
ln -s /usr/bin/cmake3 cmake-bin/cmake
|
||||||
@ -299,8 +301,14 @@ sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \
|
|||||||
src/librustc_llvm/lib.rs
|
src/librustc_llvm/lib.rs
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patch1 -p1 -b .no-override
|
%patch1 -p1 -b .stack-guard
|
||||||
%patch2 -p1 -b .no-fail-fast
|
%patch2 -p1 -b .debuginfo
|
||||||
|
|
||||||
|
# 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
|
%build
|
||||||
@ -322,11 +330,14 @@ sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \
|
|||||||
%{!?with_llvm_static: --enable-llvm-link-shared } } \
|
%{!?with_llvm_static: --enable-llvm-link-shared } } \
|
||||||
--disable-jemalloc \
|
--disable-jemalloc \
|
||||||
--disable-rpath \
|
--disable-rpath \
|
||||||
|
--disable-debuginfo-lines \
|
||||||
|
--disable-debuginfo-only-std \
|
||||||
--enable-debuginfo \
|
--enable-debuginfo \
|
||||||
--enable-vendor \
|
--enable-vendor \
|
||||||
--release-channel=%{channel}
|
--release-channel=%{channel}
|
||||||
|
|
||||||
./x.py dist
|
./x.py build
|
||||||
|
./x.py doc
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -334,7 +345,7 @@ sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \
|
|||||||
%{?library_path:export LIBRARY_PATH="%{library_path}"}
|
%{?library_path:export LIBRARY_PATH="%{library_path}"}
|
||||||
%{?rustflags:export RUSTFLAGS="%{rustflags}"}
|
%{?rustflags:export RUSTFLAGS="%{rustflags}"}
|
||||||
|
|
||||||
DESTDIR=%{buildroot} ./x.py dist --install
|
DESTDIR=%{buildroot} ./x.py install
|
||||||
|
|
||||||
|
|
||||||
# Make sure the shared libraries are in the proper libdir
|
# Make sure the shared libraries are in the proper libdir
|
||||||
@ -444,6 +455,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 20 2017 Josh Stone <jistone@redhat.com> - 1.19.0-1
|
||||||
|
- Update to 1.19.0.
|
||||||
|
|
||||||
* Thu Jun 08 2017 Josh Stone <jistone@redhat.com> - 1.18.0-1
|
* Thu Jun 08 2017 Josh Stone <jistone@redhat.com> - 1.18.0-1
|
||||||
- Update to 1.18.0.
|
- Update to 1.18.0.
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (rustc-1.18.0-src.tar.gz) = eff0460b647dfb3490e28d4dec4f9781d31a942f22de75d9bd1ba31591597226b6862ec5132e8b4fcdbcf6e6ffa085ca5dda7ff8260cd82388fc13e8d3b4a2eb
|
SHA512 (rustc-1.19.0-src.tar.xz) = 4dc0d0848d54ba7355aac7e13b3d0d3f42f05d6cd97ced9dc9e6493ba4686e1398803b567cecf24be0632b11ce1565e8d61b7603ce838b9c32dd0e663d03ba82
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
SHA512 (rustc-1.18.0-src.tar.gz) = eff0460b647dfb3490e28d4dec4f9781d31a942f22de75d9bd1ba31591597226b6862ec5132e8b4fcdbcf6e6ffa085ca5dda7ff8260cd82388fc13e8d3b4a2eb
|
SHA512 (rustc-1.19.0-src.tar.xz) = 4dc0d0848d54ba7355aac7e13b3d0d3f42f05d6cd97ced9dc9e6493ba4686e1398803b567cecf24be0632b11ce1565e8d61b7603ce838b9c32dd0e663d03ba82
|
||||||
SHA512 (rust-1.17.0-aarch64-unknown-linux-gnu.tar.gz) = 58a44c7c5ddcec2560b48103aedb6718aa944e2058683af69638b6d00d7a76de0ed32c8a0819bf7a4585d01b349b260abdd1b9d4a378e3beaa7fef7872e5deb6
|
SHA512 (rust-1.18.0-aarch64-unknown-linux-gnu.tar.gz) = a1445b84e6215d3b72ed3c33ecfb0467e9abc0eb000eb2059aacf24bed1d8f1de0d2355654d3558b405289db45512c164b45e8b5c19b1420b3eb6f6f17d83872
|
||||||
SHA512 (rust-1.17.0-armv7-unknown-linux-gnueabihf.tar.gz) = e4970d090ab067e73507ea7cbcbf39de84ca2f3e506fffe0d76cabf2fb22e88229fe9d6fec5f025da6f7975ec1e8ffb82c6e5a58d50c1c51718494a19dfdf770
|
SHA512 (rust-1.18.0-armv7-unknown-linux-gnueabihf.tar.gz) = 7f9783bf396d110da7dce69f5d27501357a6c398296aada1029cc251ac0d97b648a934e8a71c2c4cb2e9fe660e98130624d3bd45543a3fcf4e821f5ee6fda172
|
||||||
SHA512 (rust-1.17.0-i686-unknown-linux-gnu.tar.gz) = 32212fdb237cc638fe4ac4aec6b23fe9fec25c9b7329090b89dc6feac2fe7f48999b2bee8155bb345dfe94ef5fda9ea4ca670cb323ad5936046a54c495f52af9
|
SHA512 (rust-1.18.0-i686-unknown-linux-gnu.tar.gz) = 8deb0dc9aae392ff50e1e93a0039340db60dbd8838fbeb5bca87961506c21b85961bed37f89d73993e44f8e50c493ef90f7e5b815e459b3650826b97357cad59
|
||||||
SHA512 (rust-1.17.0-powerpc64le-unknown-linux-gnu.tar.gz) = 1963b596dd8c5fe3fe836319074246107a982ee6c17d973a681e1bd96870440295b73bed60929fdf445136990d15bf90d96843115db4287ffced07dafa6364d1
|
SHA512 (rust-1.18.0-powerpc64le-unknown-linux-gnu.tar.gz) = 814f07ba103a6358cff0f0a5d55d7b73ce8c1cfda2dbb426f9ace0e043a66eb76797917ebedcd50d60a7ede5e941bb3c77dbf99f5ba92e59238a09c41582edc5
|
||||||
SHA512 (rust-1.17.0-powerpc64-unknown-linux-gnu.tar.gz) = faffdf9e61e525cec9dfe47bee780a95d58c0778eafab2d9f56021f3910e5b6fee358de6af7ef0185c298921b2c010ebf2faa1c271cb4818c7e03f3424aac0ab
|
SHA512 (rust-1.18.0-powerpc64-unknown-linux-gnu.tar.gz) = 5f6107c70f71e8afec90e5a94d40e27927239e70811a373ef3e0d39191295625e15881ff738bd62ace1b04489c9a33d51f1b4eec2cc923f8d1959dae38de98d8
|
||||||
SHA512 (rust-1.17.0-s390x-unknown-linux-gnu.tar.gz) = c92cba2b24422e9ce09b1ac1fae2da0ce4d884dddc1b6606c76d8f2e94dc6e46391632dfd005669fe37a7d0c447fddf155e8976a0b3bd4b0c96dd60877ca644e
|
SHA512 (rust-1.18.0-s390x-unknown-linux-gnu.tar.gz) = 291c2aa3107b727176b90f0ff927e72b69c0830261c13805734b6e41cf4979a0000adbfddd69ccfef960b1eb9382694c6084e31adb8c2979df9973f112f3ee12
|
||||||
SHA512 (rust-1.17.0-x86_64-unknown-linux-gnu.tar.gz) = e12afcbc5a4642c908305c843f014d3802705f18d4e98e1a42dcca574dbe22af01ec8479f8c3fee5ddf12c530212118ff6eef5c4a2762ad4da6c2b071f163513
|
SHA512 (rust-1.18.0-x86_64-unknown-linux-gnu.tar.gz) = 3d5cb71c03f95145539d9f209733ef555520eb826411737c4f168bbcb8ff631a9035e7dc81c42ecf107c5115d1d69ea6620ed95331cefad6de1b9d49f87ce305
|
||||||
|
Loading…
Reference in New Issue
Block a user