Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mk/crates.mk
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ TARGET_SPECIFIC_alloc_jemalloc := 1
DOC_CRATES := std alloc collections core libc std_unicode

ifeq ($(CFG_DISABLE_JEMALLOC),)
RUSTFLAGS_std := --cfg 'feature="jemalloc"'
RUSTFLAGS_rustc_back := --cfg 'feature="jemalloc"'
endif

Expand Down
4 changes: 2 additions & 2 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -331,7 +331,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
Expand Down