about summary refs log tree commit diff
path: root/src/liballoc_jemalloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-20 07:18:38 +0000
committerbors <bors@rust-lang.org>2017-08-20 07:18:38 +0000
commit5fa54ee063d62ecfb66bc5d8a9b4a45c87a7922f (patch)
tree9b0ddd959e49f8a2df2bbdbf817dbb638182dcd3 /src/liballoc_jemalloc
parent498a8f36bfbafa3800698c826f5ae3f8b36a785c (diff)
parent519cf15ea6bcc72bc574f34f69690e16b2e548bb (diff)
downloadrust-5fa54ee063d62ecfb66bc5d8a9b4a45c87a7922f.tar.gz
rust-5fa54ee063d62ecfb66bc5d8a9b4a45c87a7922f.zip
Auto merge of #43911 - arthurprs:update-jemalloc, r=alexcrichton
Update jemalloc to 4.5.0

Second try, including the fix for osx deadlock jemalloc/jemalloc#895.

cc https://github.com/rust-lang/rust/pull/41861 @alexcrichton @RalfJung
Diffstat (limited to 'src/liballoc_jemalloc')
-rw-r--r--src/liballoc_jemalloc/build.rs24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs
index 085f62f4b0f..41193f6a41f 100644
--- a/src/liballoc_jemalloc/build.rs
+++ b/src/liballoc_jemalloc/build.rs
@@ -93,29 +93,7 @@ fn main() {
        .env("AR", &ar)
        .env("RANLIB", format!("{} s", ar.display()));
 
-    if target.contains("windows") {
-        // A bit of history here, this used to be --enable-lazy-lock added in
-        // #14006 which was filed with jemalloc in jemalloc/jemalloc#83 which
-        // was also reported to MinGW:
-        //
-        //  http://sourceforge.net/p/mingw-w64/bugs/395/
-        //
-        // When updating jemalloc to 4.0, however, it was found that binaries
-        // would exit with the status code STATUS_RESOURCE_NOT_OWNED indicating
-        // that a thread was unlocking a mutex it never locked. Disabling this
-        // "lazy lock" option seems to fix the issue, but it was enabled by
-        // default for MinGW targets in 13473c7 for jemalloc.
-        //
-        // As a result of all that, force disabling lazy lock on Windows, and
-        // after reading some code it at least *appears* that the initialization
-        // of mutexes is otherwise ok in jemalloc, so shouldn't cause problems
-        // hopefully...
-        //
-        // tl;dr: make windows behave like other platforms by disabling lazy
-        //        locking, but requires passing an option due to a historical
-        //        default with jemalloc.
-        cmd.arg("--disable-lazy-lock");
-    } else if target.contains("ios") {
+    if target.contains("ios") {
         cmd.arg("--disable-tls");
     } else if target.contains("android") {
         // We force android to have prefixed symbols because apparently