Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #69094

Merged
merged 21 commits into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f8a0286
Speed up `SipHasher128`.
nnethercote Feb 6, 2020
9e78ce0
handle TerminatorKind::Yield by returning Err(Unpromotable)
chrissimpkins Feb 10, 2020
fc3ecb2
add issue 69017 test
chrissimpkins Feb 10, 2020
8d79921
parser: Remove `Parser::prev_token_kind`
petrochenkov Feb 10, 2020
53b16fb
add main function to issue-69017 test
chrissimpkins Feb 10, 2020
4cf0365
Bump version to backtrace without the header
yaahc Feb 10, 2020
1bba9cf
rustbuild: include channel in sanitizers installed name
Keruspe Feb 6, 2020
4e7aeaf
Improve `char::is_ascii_*` code
ranma42 Dec 24, 2019
d2b08c7
Update Cargo.lock
yaahc Feb 11, 2020
9aea154
Improve `u8to64_le`.
nnethercote Feb 11, 2020
090a157
Fix failing backtrace ui tests
yaahc Feb 12, 2020
d8544ce
remove some unused objects
ljedrz Feb 11, 2020
15adbf6
Properly use the darwin archive format on Apple targets
nox Feb 12, 2020
79ebf53
Rollup merge of #67585 - ranma42:fix/char-is-ascii-codegen, r=Amanieu
Dylan-DPC Feb 12, 2020
f2d829c
Rollup merge of #68914 - nnethercote:speed-up-SipHasher128, r=michael…
Dylan-DPC Feb 12, 2020
75a977d
Rollup merge of #68994 - Keruspe:sanitizers-conflict, r=Mark-Simulacrum
Dylan-DPC Feb 12, 2020
b695f99
Rollup merge of #69032 - chrissimpkins:ice-yield-println-#69017, r=pe…
Dylan-DPC Feb 12, 2020
42f371c
Rollup merge of #69034 - petrochenkov:notokind, r=Centril
Dylan-DPC Feb 12, 2020
6b40f59
Rollup merge of #69042 - yaahc:backtrace-header, r=dtolnay
Dylan-DPC Feb 12, 2020
db48a8a
Rollup merge of #69059 - ljedrz:unused_stuff, r=Dylan-DPC
Dylan-DPC Feb 12, 2020
d9982f1
Rollup merge of #69089 - nox:sym64-crash, r=eddyb
Dylan-DPC Feb 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"

[[package]]
name = "backtrace"
version = "0.3.40"
version = "0.3.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea"
checksum = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536"
dependencies = [
"backtrace-sys",
"cfg-if",
Expand Down
16 changes: 10 additions & 6 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ impl Step for Sanitizers {
}

let out_dir = builder.native_dir(self.target).join("sanitizers");
let runtimes = supported_sanitizers(&out_dir, self.target);
let runtimes = supported_sanitizers(&out_dir, self.target, &builder.config.channel);
if runtimes.is_empty() {
return runtimes;
}
Expand Down Expand Up @@ -635,7 +635,11 @@ pub struct SanitizerRuntime {
}

/// Returns sanitizers available on a given target.
fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<SanitizerRuntime> {
fn supported_sanitizers(
out_dir: &Path,
target: Interned<String>,
channel: &str,
) -> Vec<SanitizerRuntime> {
let mut result = Vec::new();
match &*target {
"x86_64-apple-darwin" => {
Expand All @@ -644,7 +648,7 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
cmake_target: format!("clang_rt.{}_osx_dynamic", s),
path: out_dir
.join(&format!("build/lib/darwin/libclang_rt.{}_osx_dynamic.dylib", s)),
name: format!("librustc_rt.{}.dylib", s),
name: format!("librustc-{}_rt.{}.dylib", channel, s),
});
}
}
Expand All @@ -653,7 +657,7 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
result.push(SanitizerRuntime {
cmake_target: format!("clang_rt.{}-x86_64", s),
path: out_dir.join(&format!("build/lib/linux/libclang_rt.{}-x86_64.a", s)),
name: format!("librustc_rt.{}.a", s),
name: format!("librustc-{}_rt.{}.a", channel, s),
});
}
}
Expand All @@ -662,7 +666,7 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
result.push(SanitizerRuntime {
cmake_target: format!("clang_rt.{}-x86_64", s),
path: out_dir.join(&format!("build/lib/fuchsia/libclang_rt.{}-x86_64.a", s)),
name: format!("librustc_rt.{}.a", s),
name: format!("librustc-{}_rt.{}.a", channel, s),
});
}
}
Expand All @@ -671,7 +675,7 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
result.push(SanitizerRuntime {
cmake_target: format!("clang_rt.{}-aarch64", s),
path: out_dir.join(&format!("build/lib/fuchsia/libclang_rt.{}-aarch64.a", s)),
name: format!("librustc_rt.{}.a", s),
name: format!("librustc-{}_rt.{}.a", channel, s),
});
}
}
Expand Down
50 changes: 40 additions & 10 deletions src/libcore/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_alphabetic(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_alphabetic()
match *self {
'A'..='Z' | 'a'..='z' => true,
_ => false,
}
}

/// Checks if the value is an ASCII uppercase character:
Expand Down Expand Up @@ -1108,7 +1111,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_uppercase(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_uppercase()
match *self {
'A'..='Z' => true,
_ => false,
}
}

/// Checks if the value is an ASCII lowercase character:
Expand Down Expand Up @@ -1141,7 +1147,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_lowercase(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_lowercase()
match *self {
'a'..='z' => true,
_ => false,
}
}

/// Checks if the value is an ASCII alphanumeric character:
Expand Down Expand Up @@ -1177,7 +1186,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_alphanumeric(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_alphanumeric()
match *self {
'0'..='9' | 'A'..='Z' | 'a'..='z' => true,
_ => false,
}
}

/// Checks if the value is an ASCII decimal digit:
Expand Down Expand Up @@ -1210,7 +1222,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_digit(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_digit()
match *self {
'0'..='9' => true,
_ => false,
}
}

/// Checks if the value is an ASCII hexadecimal digit:
Expand Down Expand Up @@ -1246,7 +1261,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_hexdigit(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_hexdigit()
match *self {
'0'..='9' | 'A'..='F' | 'a'..='f' => true,
_ => false,
}
}

/// Checks if the value is an ASCII punctuation character:
Expand Down Expand Up @@ -1283,7 +1301,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_punctuation(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_punctuation()
match *self {
'!'..='/' | ':'..='@' | '['..='`' | '{'..='~' => true,
_ => false,
}
}

/// Checks if the value is an ASCII graphic character:
Expand Down Expand Up @@ -1316,7 +1337,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_graphic(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_graphic()
match *self {
'!'..='~' => true,
_ => false,
}
}

/// Checks if the value is an ASCII whitespace character:
Expand Down Expand Up @@ -1366,7 +1390,10 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_whitespace(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_whitespace()
match *self {
'\t' | '\n' | '\x0C' | '\r' | ' ' => true,
_ => false,
}
}

/// Checks if the value is an ASCII control character:
Expand Down Expand Up @@ -1401,6 +1428,9 @@ impl char {
#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "68983")]
#[inline]
pub const fn is_ascii_control(&self) -> bool {
self.is_ascii() && (*self as u8).is_ascii_control()
match *self {
'\0'..='\x1F' | '\x7F' => true,
_ => false,
}
}
}
2 changes: 0 additions & 2 deletions src/librustc/infer/region_constraints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,6 @@ impl TaintDirections {
}
}

pub struct ConstraintInfo {}

impl<'tcx> RegionConstraintCollector<'tcx> {
pub fn new() -> Self {
Self::default()
Expand Down
1 change: 1 addition & 0 deletions src/librustc_codegen_llvm/llvm/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ pub enum ArchiveKind {
Other,
K_GNU,
K_BSD,
K_DARWIN,
K_COFF,
}

Expand Down
1 change: 1 addition & 0 deletions src/librustc_codegen_llvm/llvm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl FromStr for ArchiveKind {
match s {
"gnu" => Ok(ArchiveKind::K_GNU),
"bsd" => Ok(ArchiveKind::K_BSD),
"darwin" => Ok(ArchiveKind::K_DARWIN),
"coff" => Ok(ArchiveKind::K_COFF),
_ => Err(()),
}
Expand Down
7 changes: 5 additions & 2 deletions src/librustc_codegen_ssa/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,20 +765,23 @@ fn link_sanitizer_runtime(sess: &Session, crate_type: config::CrateType, linker:
let default_sysroot = filesearch::get_or_default_sysroot();
let default_tlib =
filesearch::make_target_lib_path(&default_sysroot, sess.opts.target_triple.triple());
let channel = option_env!("CFG_RELEASE_CHANNEL")
.map(|channel| format!("-{}", channel))
.unwrap_or_default();

match sess.opts.target_triple.triple() {
"x86_64-apple-darwin" => {
// On Apple platforms, the sanitizer is always built as a dylib, and
// LLVM will link to `@rpath/*.dylib`, so we need to specify an
// rpath to the library as well (the rpath should be absolute, see
// PR #41352 for details).
let libname = format!("rustc_rt.{}", name);
let libname = format!("rustc{}_rt.{}", channel, name);
let rpath = default_tlib.to_str().expect("non-utf8 component in path");
linker.args(&["-Wl,-rpath".into(), "-Xlinker".into(), rpath.into()]);
linker.link_dylib(Symbol::intern(&libname));
}
"x86_64-unknown-linux-gnu" | "x86_64-fuchsia" | "aarch64-fuchsia" => {
let filename = format!("librustc_rt.{}.a", name);
let filename = format!("librustc{}_rt.{}.a", channel, name);
let path = default_tlib.join(&filename);
linker.link_whole_rlib(&path);
}
Expand Down
4 changes: 4 additions & 0 deletions src/librustc_codegen_ssa/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-env-changed=CFG_RELEASE_CHANNEL");
}
Loading