diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 3f30756a568ce..2ea026244034f 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -186,7 +186,7 @@ impl Step for Llvm { } // http://llvm.org/docs/HowToCrossCompileLLVM.html - if target != build.build { + if target != build.build && !emscripten { builder.ensure(Llvm { target: build.build, emscripten: false, diff --git a/src/ci/docker/dist-i686-freebsd/Dockerfile b/src/ci/docker/dist-i686-freebsd/Dockerfile index 686afc97289b1..673fa4c0c4bc0 100644 --- a/src/ci/docker/dist-i686-freebsd/Dockerfile +++ b/src/ci/docker/dist-i686-freebsd/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 RUN apt-get update && apt-get install -y --no-install-recommends \ clang \ diff --git a/src/dlmalloc b/src/dlmalloc index d3812c3accaee..a2b424b600235 160000 --- a/src/dlmalloc +++ b/src/dlmalloc @@ -1 +1 @@ -Subproject commit d3812c3accaee7ad23068ed4fc089cc05c7a538f +Subproject commit a2b424b600235af58f453577c2da1b0e1de2ffa5 diff --git a/src/libcompiler_builtins b/src/libcompiler_builtins index 0a95675bab808..345447948f7a5 160000 --- a/src/libcompiler_builtins +++ b/src/libcompiler_builtins @@ -1 +1 @@ -Subproject commit 0a95675bab808c49f86208bacc89c5d9c53ac43f +Subproject commit 345447948f7a51eca970fa036cefd613d54a4f79 diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs index 07b08e2e61ac0..95a507ab9e351 100644 --- a/src/librustc_resolve/resolve_imports.rs +++ b/src/librustc_resolve/resolve_imports.rs @@ -1026,9 +1026,12 @@ fn import_path_to_string(names: &[SpannedIdent], if names.is_empty() { import_directive_subclass_to_string(subclass) } else { - (format!("{}::{}", + let x = format!("{}::{}", names_to_string(names), - import_directive_subclass_to_string(subclass))) + import_directive_subclass_to_string(subclass)); + assert!(!names.is_empty()); + assert!(!x.starts_with("::")); + return x } } } diff --git a/src/llvm b/src/llvm index bc344d5bc23c6..9f81beaf32608 160000 --- a/src/llvm +++ b/src/llvm @@ -1 +1 @@ -Subproject commit bc344d5bc23c61ff9baf82d268a0edf199933cc3 +Subproject commit 9f81beaf32608fbe1fe0f2a82f974e800e9d8c62 diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 611d63f6a4d14..4dfc4029d75dc 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -552,9 +552,11 @@ static unsigned fromRust(LLVMRustDIFlags Flags) { if (isSet(Flags & LLVMRustDIFlags::FlagRValueReference)) { Result |= DINode::DIFlags::FlagRValueReference; } +#if LLVM_VERSION_LE(4, 0) if (isSet(Flags & LLVMRustDIFlags::FlagExternalTypeRef)) { Result |= DINode::DIFlags::FlagExternalTypeRef; } +#endif if (isSet(Flags & LLVMRustDIFlags::FlagIntroducedVirtual)) { Result |= DINode::DIFlags::FlagIntroducedVirtual; } diff --git a/src/rustllvm/llvm-rebuild-trigger b/src/rustllvm/llvm-rebuild-trigger index 2635ca73303e7..3cd044708cee2 100644 --- a/src/rustllvm/llvm-rebuild-trigger +++ b/src/rustllvm/llvm-rebuild-trigger @@ -1,4 +1,4 @@ # If this file is modified, then llvm will be (optionally) cleaned and then rebuilt. # The actual contents of this file do not matter, but to trigger a change on the # build bots then the contents should be changed so git updates the mtime. -2018-01-25 +2018-02-09 diff --git a/src/test/run-pass/backtrace-debuginfo.rs b/src/test/run-pass/backtrace-debuginfo.rs index e8b5f3490e50e..2b82a8943636e 100644 --- a/src/test/run-pass/backtrace-debuginfo.rs +++ b/src/test/run-pass/backtrace-debuginfo.rs @@ -15,11 +15,14 @@ // Unfortunately, LLVM has no "disable" option for this, so we have to set // "enable" to 0 instead. -// compile-flags:-g -Cllvm-args=-enable-tail-merge=0 +// compile-flags:-g -Cllvm-args=-enable-tail-merge=0 -Cllvm-args=-opt-bisect-limit=0 // ignore-pretty issue #37195 // ignore-cloudabi spawning processes is not supported // ignore-emscripten spawning processes is not supported +// note that above `-opt-bisect-limit=0` is used to basically disable +// optimizations + use std::env; #[path = "backtrace-debuginfo-aux.rs"] mod aux; @@ -114,18 +117,26 @@ fn outer(mut counter: i32, main_pos: Pos) { inner_inlined(&mut counter, main_pos, pos!()); } -fn check_trace(output: &str, error: &str) { +fn check_trace(output: &str, error: &str) -> Result<(), String> { // reverse the position list so we can start with the last item (which was the first line) let mut remaining: Vec<&str> = output.lines().map(|s| s.trim()).rev().collect(); - assert!(error.contains("stack backtrace"), "no backtrace in the error: {}", error); + if !error.contains("stack backtrace") { + return Err(format!("no backtrace found in stderr:\n{}", error)) + } for line in error.lines() { if !remaining.is_empty() && line.contains(remaining.last().unwrap()) { remaining.pop(); } } - assert!(remaining.is_empty(), - "trace does not match position list: {}\n---\n{}", error, output); + if !remaining.is_empty() { + return Err(format!("trace does not match position list\n\ + still need to find {:?}\n\n\ + --- stdout\n{}\n\ + --- stderr\n{}", + remaining, output, error)) + } + Ok(()) } fn run_test(me: &str) { @@ -133,6 +144,7 @@ fn run_test(me: &str) { use std::process::Command; let mut i = 0; + let mut errors = Vec::new(); loop { let out = Command::new(me) .env("RUST_BACKTRACE", "full") @@ -143,10 +155,20 @@ fn run_test(me: &str) { assert!(output.contains("done."), "bad output for successful run: {}", output); break; } else { - check_trace(output, error); + if let Err(e) = check_trace(output, error) { + errors.push(e); + } } i += 1; } + if errors.len() > 0 { + for error in errors { + println!("---------------------------------------"); + println!("{}", error); + } + + panic!("found some errors"); + } } #[inline(never)]