From 648e44f611d4e24d6bdde02216e1917d78f4ebf4 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 8 Oct 2017 20:54:29 -0700 Subject: [PATCH] Upgrade jemalloc to 5.0.1 --- src/jemalloc | 2 +- src/liballoc_jemalloc/build.rs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/jemalloc b/src/jemalloc index 1f5a28755e301..3c8e8db1b57e8 160000 --- a/src/jemalloc +++ b/src/jemalloc @@ -1 +1 @@ -Subproject commit 1f5a28755e301ac581e2048011e4e0ff3da482ef +Subproject commit 3c8e8db1b57e8101c33b2738213aad07cecbb3d3 diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs index 7dd85ddcc7965..e08b70de390db 100644 --- a/src/liballoc_jemalloc/build.rs +++ b/src/liballoc_jemalloc/build.rs @@ -69,6 +69,10 @@ fn main() { let cflags = compiler.args() .iter() .map(|s| s.to_str().unwrap()) + .filter(|&s| { + // separate function/data sections trigger errors with android's TLS emulation + !target.contains("android") || (s != "-ffunction-sections" && s != "-fdata-sections") + }) .collect::>() .join(" "); @@ -78,6 +82,7 @@ fn main() { .unwrap() .replace("C:\\", "/c/") .replace("\\", "/")) + .arg("--disable-cxx") .current_dir(&native.out_dir) .env("CC", compiler.path()) .env("EXTRA_CFLAGS", cflags.clone()) @@ -93,9 +98,7 @@ fn main() { .env("AR", &ar) .env("RANLIB", format!("{} s", ar.display())); - if target.contains("ios") { - cmd.arg("--disable-tls"); - } else if target.contains("android") { + if target.contains("android") { // We force android to have prefixed symbols because apparently // replacement of the libc allocator doesn't quite work. When this was // tested (unprefixed symbols), it was found that the `realpath` @@ -106,7 +109,6 @@ fn main() { // If the test suite passes, however, without symbol prefixes then we // should be good to go! cmd.arg("--with-jemalloc-prefix=je_"); - cmd.arg("--disable-tls"); } else if target.contains("dragonfly") || target.contains("musl") { cmd.arg("--with-jemalloc-prefix=je_"); }