From 6cf3aafa10a87196f1f4e4dc646d68885baa40a7 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 23 Nov 2016 22:10:34 -0500 Subject: [PATCH] std: link to liballoc_system if compiled without the jemalloc feature fixes #36501 --- src/libstd/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 9557c520c5071..87dce860278ca 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -221,7 +221,7 @@ // Always use alloc_system during stage0 since jemalloc might be unavailable or // disabled (Issue #30592) -#![cfg_attr(stage0, feature(alloc_system))] +#![cfg_attr(any(stage0, not(feature = "jemalloc")), feature(alloc_system))] // Turn warnings into errors, but only after stage0, where it can be useful for // code to emit warnings during language transitions @@ -332,7 +332,7 @@ extern crate libc; // We always need an unwinder currently for backtraces extern crate unwind; -#[cfg(stage0)] +#[cfg(any(stage0, not(feature = "jemalloc")))] extern crate alloc_system; // compiler-rt intrinsics