File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 318
318
319
319
#![ default_lib_allocator]
320
320
321
+ // Always use alloc_system during stage0 since we don't know if the alloc_*
322
+ // crate the stage0 compiler will pick by default is available (most
323
+ // obviously, if the user has disabled jemalloc in `./configure`).
324
+ // `force_alloc_system` is *only* intended as a workaround for local rebuilds
325
+ // with a rustc without jemalloc.
326
+ #![ cfg_attr( any( stage0, feature = "force_alloc_system" ) , feature( global_allocator) ) ]
327
+ #[ cfg( any( stage0, feature = "force_alloc_system" ) ) ]
328
+ #[ global_allocator]
329
+ static ALLOC : alloc_system:: System = alloc_system:: System ;
330
+
321
331
// Explicitly import the prelude. The compiler uses this same unstable attribute
322
332
// to import the prelude implicitly when building crates that depend on std.
323
333
#[ prelude_import]
You can’t perform that action at this time.
0 commit comments