Skip to content

Commit 648e44f

Browse files
committed
Upgrade jemalloc to 5.0.1
1 parent 692b94a commit 648e44f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/jemalloc

Submodule jemalloc updated 259 files

src/liballoc_jemalloc/build.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ fn main() {
6969
let cflags = compiler.args()
7070
.iter()
7171
.map(|s| s.to_str().unwrap())
72+
.filter(|&s| {
73+
// separate function/data sections trigger errors with android's TLS emulation
74+
!target.contains("android") || (s != "-ffunction-sections" && s != "-fdata-sections")
75+
})
7276
.collect::<Vec<_>>()
7377
.join(" ");
7478

@@ -78,6 +82,7 @@ fn main() {
7882
.unwrap()
7983
.replace("C:\\", "/c/")
8084
.replace("\\", "/"))
85+
.arg("--disable-cxx")
8186
.current_dir(&native.out_dir)
8287
.env("CC", compiler.path())
8388
.env("EXTRA_CFLAGS", cflags.clone())
@@ -93,9 +98,7 @@ fn main() {
9398
.env("AR", &ar)
9499
.env("RANLIB", format!("{} s", ar.display()));
95100

96-
if target.contains("ios") {
97-
cmd.arg("--disable-tls");
98-
} else if target.contains("android") {
101+
if target.contains("android") {
99102
// We force android to have prefixed symbols because apparently
100103
// replacement of the libc allocator doesn't quite work. When this was
101104
// tested (unprefixed symbols), it was found that the `realpath`
@@ -106,7 +109,6 @@ fn main() {
106109
// If the test suite passes, however, without symbol prefixes then we
107110
// should be good to go!
108111
cmd.arg("--with-jemalloc-prefix=je_");
109-
cmd.arg("--disable-tls");
110112
} else if target.contains("dragonfly") || target.contains("musl") {
111113
cmd.arg("--with-jemalloc-prefix=je_");
112114
}

0 commit comments

Comments
 (0)