Skip to content

Commit

Permalink
Upgrade jemalloc to 5.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Oct 12, 2017
1 parent 692b94a commit 648e44f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/jemalloc
Submodule jemalloc updated 259 files
10 changes: 6 additions & 4 deletions src/liballoc_jemalloc/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>()
.join(" ");

Expand All @@ -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())
Expand All @@ -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`
Expand All @@ -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_");
}
Expand Down

0 comments on commit 648e44f

Please sign in to comment.