From 79a63735730c4da0c19c46f914f8dba37fea7b5a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 7 Feb 2016 12:03:06 -0800 Subject: [PATCH] rustc: Tweak exe allocator for MinGW/rumprun Both of these targets have jemalloc disabled unconditionally right now, so using `maybe_jemalloc` here isn't right. This fixes the case where a Linux compiler (which is itself configured to use jemalloc) attempts to cross-compile to MinGW, causing it to try to find an `alloc_jemalloc` crate (and failing). --- src/librustc_back/target/windows_base.rs | 1 - src/librustc_back/target/x86_64_rumprun_netbsd.rs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_back/target/windows_base.rs b/src/librustc_back/target/windows_base.rs index 634a63cf0bb..4eacea3fcd9 100644 --- a/src/librustc_back/target/windows_base.rs +++ b/src/librustc_back/target/windows_base.rs @@ -84,7 +84,6 @@ pub fn opts() -> TargetOptions { "rsend.o".to_string() ), custom_unwind_resume: true, - exe_allocation_crate: super::maybe_jemalloc(), .. Default::default() } diff --git a/src/librustc_back/target/x86_64_rumprun_netbsd.rs b/src/librustc_back/target/x86_64_rumprun_netbsd.rs index d63ad53cc2b..c97b434b9e0 100644 --- a/src/librustc_back/target/x86_64_rumprun_netbsd.rs +++ b/src/librustc_back/target/x86_64_rumprun_netbsd.rs @@ -21,6 +21,7 @@ pub fn target() -> Target { base.position_independent_executables = false; base.disable_redzone = true; base.no_default_libraries = false; + base.exe_allocation_crate = "alloc_system".to_string(); Target { llvm_target: "x86_64-rumprun-netbsd".to_string(),