setting ABORTING_MALLOC for asmjs backend

This commit is contained in:
snf 2018-03-14 14:56:37 +00:00
parent ff2d506c2c
commit 9e64946bde
5 changed files with 5 additions and 23 deletions

View File

@ -9,11 +9,8 @@
// except according to those terms.
use std::borrow::Cow;
#[cfg(not(target_arch = "asmjs"))]
use std::collections::CollectionAllocErr::*;
#[cfg(not(target_arch = "asmjs"))]
use std::mem::size_of;
#[cfg(not(target_arch = "asmjs"))]
use std::{usize, isize};
pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
@ -535,7 +532,6 @@ fn test_reserve_exact() {
assert!(s.capacity() >= 33)
}
#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve() {
@ -613,7 +609,6 @@ fn test_try_reserve() {
}
#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve_exact() {

View File

@ -10,11 +10,8 @@
use std::borrow::Cow;
use std::mem::size_of;
use std::{usize, panic};
#[cfg(not(target_arch = "asmjs"))]
use std::isize;
use std::{usize, isize, panic};
use std::vec::{Drain, IntoIter};
#[cfg(not(target_arch = "asmjs"))]
use std::collections::CollectionAllocErr::*;
struct DropCounter<'a> {
@ -994,7 +991,6 @@ fn test_reserve_exact() {
assert!(v.capacity() >= 33)
}
#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve() {
@ -1097,7 +1093,6 @@ fn test_try_reserve() {
}
#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve_exact() {

View File

@ -11,13 +11,9 @@
use std::collections::VecDeque;
use std::fmt::Debug;
use std::collections::vec_deque::{Drain};
#[cfg(not(target_arch = "asmjs"))]
use std::collections::CollectionAllocErr::*;
#[cfg(not(target_arch = "asmjs"))]
use std::mem::size_of;
use std::isize;
#[cfg(not(target_arch = "asmjs"))]
use std::usize;
use std::{usize, isize};
use self::Taggy::*;
use self::Taggypar::*;
@ -1053,7 +1049,6 @@ fn test_reserve_exact_2() {
assert!(v.capacity() >= 48)
}
#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve() {
@ -1155,7 +1150,6 @@ fn test_try_reserve() {
}
#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve_exact() {

View File

@ -15,7 +15,9 @@ pub fn target() -> Result<Target, String> {
let mut args = LinkArgs::new();
args.insert(LinkerFlavor::Em,
vec!["-s".to_string(),
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string()]);
"ERROR_ON_UNDEFINED_SYMBOLS=1".to_string(),
"-s".to_string(),
"ABORTING_MALLOC=0".to_string()]);
let opts = TargetOptions {
dynamic_linking: false,

View File

@ -2755,11 +2755,8 @@ mod test_map {
use cell::RefCell;
use rand::{thread_rng, Rng};
use panic;
#[cfg(not(target_arch = "asmjs"))]
use realstd::collections::CollectionAllocErr::*;
#[cfg(not(target_arch = "asmjs"))]
use realstd::mem::size_of;
#[cfg(not(target_arch = "asmjs"))]
use realstd::usize;
#[test]
@ -3696,7 +3693,6 @@ mod test_map {
assert_eq!(hm.len(), 0);
}
#[cfg(not(target_arch = "asmjs"))]
#[test]
fn test_try_reserve() {