Disable jemalloc on aarch64/powerpc

Sounds like jemalloc is broken on systems which differ in page size than the
host it was compiled on (unless an option was passed). This unfortunately
reduces the portability of binaries created and can often make Rust segfault by
default. For now let's patch over this by disabling jemalloc until we can figure
out a better solution.

Closes 
Closes 
cc 
This commit is contained in:
Alex Crichton 2016-10-24 19:33:28 -07:00
parent a5b6a9fa8a
commit de80670f74
12 changed files with 45 additions and 0 deletions

@ -13,6 +13,10 @@ use target::{Target, TargetOptions, TargetResult};
pub fn target() -> TargetResult { pub fn target() -> TargetResult {
let mut base = super::linux_base::opts(); let mut base = super::linux_base::opts();
base.max_atomic_width = Some(128); base.max_atomic_width = Some(128);
// see #36994
base.exe_allocation_crate = "alloc_system".to_string();
Ok(Target { Ok(Target {
llvm_target: "aarch64-unknown-linux-gnu".to_string(), llvm_target: "aarch64-unknown-linux-gnu".to_string(),
target_endian: "little".to_string(), target_endian: "little".to_string(),

@ -25,6 +25,10 @@ pub fn target() -> TargetResult {
cpu: "mips64r2".to_string(), cpu: "mips64r2".to_string(),
features: "+mips64r2".to_string(), features: "+mips64r2".to_string(),
max_atomic_width: Some(64), max_atomic_width: Some(64),
// see #36994
exe_allocation_crate: "alloc_system".to_string(),
..super::linux_base::opts() ..super::linux_base::opts()
}, },
}) })

@ -25,6 +25,10 @@ pub fn target() -> TargetResult {
cpu: "mips64r2".to_string(), cpu: "mips64r2".to_string(),
features: "+mips64r2".to_string(), features: "+mips64r2".to_string(),
max_atomic_width: Some(64), max_atomic_width: Some(64),
// see #36994
exe_allocation_crate: "alloc_system".to_string(),
..super::linux_base::opts() ..super::linux_base::opts()
}, },
}) })

@ -24,6 +24,10 @@ pub fn target() -> TargetResult {
cpu: "mips32r2".to_string(), cpu: "mips32r2".to_string(),
features: "+mips32r2".to_string(), features: "+mips32r2".to_string(),
max_atomic_width: Some(32), max_atomic_width: Some(32),
// see #36994
exe_allocation_crate: "alloc_system".to_string(),
..super::linux_base::opts() ..super::linux_base::opts()
}, },
}) })

@ -24,6 +24,10 @@ pub fn target() -> TargetResult {
cpu: "mips32r2".to_string(), cpu: "mips32r2".to_string(),
features: "+mips32r2,+soft-float".to_string(), features: "+mips32r2,+soft-float".to_string(),
max_atomic_width: Some(32), max_atomic_width: Some(32),
// see #36994
exe_allocation_crate: "alloc_system".to_string(),
..super::linux_base::opts() ..super::linux_base::opts()
} }
}) })

@ -24,6 +24,10 @@ pub fn target() -> TargetResult {
cpu: "mips32r2".to_string(), cpu: "mips32r2".to_string(),
features: "+mips32r2,+soft-float".to_string(), features: "+mips32r2,+soft-float".to_string(),
max_atomic_width: Some(32), max_atomic_width: Some(32),
// see #36994
exe_allocation_crate: "alloc_system".to_string(),
..super::linux_base::opts() ..super::linux_base::opts()
}, },
}) })

@ -25,6 +25,10 @@ pub fn target() -> TargetResult {
cpu: "mips32".to_string(), cpu: "mips32".to_string(),
features: "+mips32".to_string(), features: "+mips32".to_string(),
max_atomic_width: Some(32), max_atomic_width: Some(32),
// see #36994
exe_allocation_crate: "alloc_system".to_string(),
..super::linux_base::opts() ..super::linux_base::opts()
}, },
}) })

@ -24,6 +24,10 @@ pub fn target() -> TargetResult {
cpu: "mips32".to_string(), cpu: "mips32".to_string(),
features: "+mips32,+soft-float".to_string(), features: "+mips32,+soft-float".to_string(),
max_atomic_width: Some(32), max_atomic_width: Some(32),
// see #36994
exe_allocation_crate: "alloc_system".to_string(),
..super::linux_base::opts() ..super::linux_base::opts()
} }
}) })

@ -25,6 +25,10 @@ pub fn target() -> TargetResult {
cpu: "mips32".to_string(), cpu: "mips32".to_string(),
features: "+mips32,+soft-float".to_string(), features: "+mips32,+soft-float".to_string(),
max_atomic_width: Some(32), max_atomic_width: Some(32),
// see #36994
exe_allocation_crate: "alloc_system".to_string(),
..super::linux_base::opts() ..super::linux_base::opts()
}, },
}) })

@ -16,6 +16,9 @@ pub fn target() -> TargetResult {
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
base.max_atomic_width = Some(64); base.max_atomic_width = Some(64);
// see #36994
base.exe_allocation_crate = "alloc_system".to_string();
Ok(Target { Ok(Target {
llvm_target: "powerpc64-unknown-linux-gnu".to_string(), llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
target_endian: "big".to_string(), target_endian: "big".to_string(),

@ -16,6 +16,9 @@ pub fn target() -> TargetResult {
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
base.max_atomic_width = Some(64); base.max_atomic_width = Some(64);
// see #36994
base.exe_allocation_crate = "alloc_system".to_string();
Ok(Target { Ok(Target {
llvm_target: "powerpc64le-unknown-linux-gnu".to_string(), llvm_target: "powerpc64le-unknown-linux-gnu".to_string(),
target_endian: "little".to_string(), target_endian: "little".to_string(),

@ -15,6 +15,9 @@ pub fn target() -> TargetResult {
base.pre_link_args.push("-m32".to_string()); base.pre_link_args.push("-m32".to_string());
base.max_atomic_width = Some(32); base.max_atomic_width = Some(32);
// see #36994
base.exe_allocation_crate = "alloc_system".to_string();
Ok(Target { Ok(Target {
llvm_target: "powerpc-unknown-linux-gnu".to_string(), llvm_target: "powerpc-unknown-linux-gnu".to_string(),
target_endian: "big".to_string(), target_endian: "big".to_string(),