From a7422607cca05a6d4029595194c3f5f52b47f3d4 Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Thu, 23 Nov 2017 17:22:22 +0100 Subject: [PATCH 1/2] disable jemalloc on exectuable for ios targets --- src/librustc_back/target/apple_ios_base.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustc_back/target/apple_ios_base.rs b/src/librustc_back/target/apple_ios_base.rs index 4b02d0b60b8b5..fb9f65e18e80c 100644 --- a/src/librustc_back/target/apple_ios_base.rs +++ b/src/librustc_back/target/apple_ios_base.rs @@ -99,6 +99,7 @@ pub fn opts(arch: Arch) -> Result { executables: true, pre_link_args, has_elf_tls: false, + exe_allocation_crate: None, .. super::apple_base::opts() }) } From ab13ec063dfa02643989841697f2c7a49a93f46e Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Thu, 30 Nov 2017 23:14:29 +0100 Subject: [PATCH 2/2] explanatory note for the workaround --- src/librustc_back/target/apple_ios_base.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc_back/target/apple_ios_base.rs b/src/librustc_back/target/apple_ios_base.rs index fb9f65e18e80c..1895ab1eb7e78 100644 --- a/src/librustc_back/target/apple_ios_base.rs +++ b/src/librustc_back/target/apple_ios_base.rs @@ -99,6 +99,9 @@ pub fn opts(arch: Arch) -> Result { executables: true, pre_link_args, has_elf_tls: false, + // The following line is a workaround for jemalloc 4.5 being broken on + // ios. jemalloc 5.0 is supposed to fix this. + // see https://github.com/rust-lang/rust/issues/45262 exe_allocation_crate: None, .. super::apple_base::opts() })