diff options
| author | bors <bors@rust-lang.org> | 2019-10-04 20:33:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-04 20:33:02 +0000 |
| commit | 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91 (patch) | |
| tree | 9a1cd1fe1091eb7e2ddaf1df8f9ea93eb70c6fa2 /src/liballoc | |
| parent | 2e7244807a7878f6eca3eb7d97ae9b413aa49014 (diff) | |
| parent | 4a4df29d6fa12c303e3991f0e0e3677342c4787c (diff) | |
| download | rust-7870050796e5904a0fc85ecbe6fa6dde1cfe0c91.tar.gz rust-7870050796e5904a0fc85ecbe6fa6dde1cfe0c91.zip | |
Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichton
Upgrade Emscripten targets to use upstream LLVM backend - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/tests/binary_heap.rs | 13 | ||||
| -rw-r--r-- | src/liballoc/tests/str.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/tests/str.rs.rej | 10 | ||||
| -rw-r--r-- | src/liballoc/tests/vec.rs | 7 |
4 files changed, 23 insertions, 9 deletions
diff --git a/src/liballoc/tests/binary_heap.rs b/src/liballoc/tests/binary_heap.rs index 0685fa943c0..b8c720264d0 100644 --- a/src/liballoc/tests/binary_heap.rs +++ b/src/liballoc/tests/binary_heap.rs @@ -1,10 +1,5 @@ -use std::cmp; use std::collections::BinaryHeap; use std::collections::binary_heap::{Drain, PeekMut}; -use std::panic::{self, AssertUnwindSafe}; -use std::sync::atomic::{AtomicUsize, Ordering}; - -use rand::{thread_rng, seq::SliceRandom}; #[test] fn test_iterator() { @@ -281,9 +276,15 @@ fn assert_covariance() { // even if the order may not be correct. // // Destructors must be called exactly once per element. +// FIXME: re-enable emscripten once it can unwind again #[test] -#[cfg(not(miri))] // Miri does not support catching panics +#[cfg(not(any(miri, target_os = "emscripten")))] // Miri does not support catching panics fn panic_safe() { + use std::cmp; + use std::panic::{self, AssertUnwindSafe}; + use std::sync::atomic::{AtomicUsize, Ordering}; + use rand::{thread_rng, seq::SliceRandom}; + static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0); #[derive(Eq, PartialEq, Ord, Clone, Debug)] diff --git a/src/liballoc/tests/str.rs b/src/liballoc/tests/str.rs index 4332b2e90fd..cb73c7c179c 100644 --- a/src/liballoc/tests/str.rs +++ b/src/liballoc/tests/str.rs @@ -483,7 +483,7 @@ mod slice_index { } #[test] - #[cfg(not(target_arch = "asmjs"))] // hits an OOM + #[cfg(not(target_os = "emscripten"))] // hits an OOM #[cfg(not(miri))] // Miri is too slow fn simple_big() { fn a_million_letter_x() -> String { diff --git a/src/liballoc/tests/str.rs.rej b/src/liballoc/tests/str.rs.rej new file mode 100644 index 00000000000..abcba0c2e84 --- /dev/null +++ b/src/liballoc/tests/str.rs.rej @@ -0,0 +1,10 @@ +diff a/src/liballoc/tests/str.rs b/src/liballoc/tests/str.rs (rejected hunks) +@@ -483,7 +483,7 @@ mod slice_index { + } + + #[test] +- #[cfg(not(target_arch = "asmjs"))] // hits an OOM ++ #[cfg(not(target_arch = "js"))] // hits an OOM + #[cfg(not(miri))] // Miri is too slow + fn simple_big() { + fn a_million_letter_x() -> String { diff --git a/src/liballoc/tests/vec.rs b/src/liballoc/tests/vec.rs index 98d013dfa2b..80537217697 100644 --- a/src/liballoc/tests/vec.rs +++ b/src/liballoc/tests/vec.rs @@ -944,8 +944,10 @@ fn drain_filter_complex() { } } +// Miri does not support catching panics +// FIXME: re-enable emscripten once it can unwind again #[test] -#[cfg(not(miri))] // Miri does not support catching panics +#[cfg(not(any(miri, target_os = "emscripten")))] fn drain_filter_consumed_panic() { use std::rc::Rc; use std::sync::Mutex; @@ -995,8 +997,9 @@ fn drain_filter_consumed_panic() { } } +// FIXME: Re-enable emscripten once it can catch panics #[test] -#[cfg(not(miri))] // Miri does not support catching panics +#[cfg(not(any(miri, target_os = "emscripten")))] // Miri does not support catching panics fn drain_filter_unconsumed_panic() { use std::rc::Rc; use std::sync::Mutex; |
