parent
e8f558543b
commit
458ba7aeb5
1 changed files with 10 additions and 0 deletions
|
@ -318,6 +318,16 @@
|
||||||
|
|
||||||
#![default_lib_allocator]
|
#![default_lib_allocator]
|
||||||
|
|
||||||
|
// Always use alloc_system during stage0 since we don't know if the alloc_*
|
||||||
|
// crate the stage0 compiler will pick by default is available (most
|
||||||
|
// obviously, if the user has disabled jemalloc in `./configure`).
|
||||||
|
// `force_alloc_system` is *only* intended as a workaround for local rebuilds
|
||||||
|
// with a rustc without jemalloc.
|
||||||
|
#![cfg_attr(any(stage0, feature = "force_alloc_system"), feature(global_allocator))]
|
||||||
|
#[cfg(any(stage0, feature = "force_alloc_system"))]
|
||||||
|
#[global_allocator]
|
||||||
|
static ALLOC: alloc_system::System = alloc_system::System;
|
||||||
|
|
||||||
// Explicitly import the prelude. The compiler uses this same unstable attribute
|
// Explicitly import the prelude. The compiler uses this same unstable attribute
|
||||||
// to import the prelude implicitly when building crates that depend on std.
|
// to import the prelude implicitly when building crates that depend on std.
|
||||||
#[prelude_import]
|
#[prelude_import]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue