Skip to content

Commit 0b1fa98

Browse files
author
Jorge Aparicio
committed
std: link to liballoc_system if compiled without the jemalloc feature
fixes rust-lang#36501
1 parent 99913c5 commit 0b1fa98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/libstd/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221

222222
// Always use alloc_system during stage0 since jemalloc might be unavailable or
223223
// disabled (Issue #30592)
224-
#![cfg_attr(stage0, feature(alloc_system))]
224+
#![cfg_attr(any(stage0, not(feature = "jemalloc")), feature(alloc_system))]
225225

226226
// Turn warnings into errors, but only after stage0, where it can be useful for
227227
// code to emit warnings during language transitions
@@ -331,7 +331,7 @@ extern crate libc;
331331
// We always need an unwinder currently for backtraces
332332
extern crate unwind;
333333

334-
#[cfg(stage0)]
334+
#[cfg(any(stage0, not(feature = "jemalloc")))]
335335
extern crate alloc_system;
336336

337337
// compiler-rt intrinsics

0 commit comments

Comments
 (0)