@@ -242,7 +242,7 @@ pub struct Config {
242242 pub hosts : Vec < TargetSelection > ,
243243 pub targets : Vec < TargetSelection > ,
244244 pub local_rebuild : bool ,
245- pub jemalloc : bool ,
245+ pub override_allocator : bool ,
246246 pub control_flow_guard : bool ,
247247 pub ehcont_guard : bool ,
248248
@@ -570,7 +570,7 @@ impl Config {
570570 thin_lto_import_instr_limit : rust_thin_lto_import_instr_limit,
571571 parallel_frontend_threads : rust_parallel_frontend_threads,
572572 remap_debuginfo : rust_remap_debuginfo,
573- jemalloc : rust_jemalloc ,
573+ override_allocator : rust_override_allocator ,
574574 test_compare_mode : rust_test_compare_mode,
575575 llvm_libunwind : rust_llvm_libunwind,
576576 control_flow_guard : rust_control_flow_guard,
@@ -900,7 +900,7 @@ impl Config {
900900 codegen_backends : target_codegen_backends,
901901 runner : target_runner,
902902 optimized_compiler_builtins : target_optimized_compiler_builtins,
903- jemalloc : target_jemalloc ,
903+ override_allocator : target_override_allocator ,
904904 } = cfg;
905905
906906 let mut target = Target :: from_triple ( & triple) ;
@@ -976,7 +976,7 @@ impl Config {
976976 target. rpath = target_rpath;
977977 target. rustflags = target_rustflags. unwrap_or_default ( ) ;
978978 target. optimized_compiler_builtins = target_optimized_compiler_builtins;
979- target. jemalloc = target_jemalloc ;
979+ target. override_allocator = target_override_allocator ;
980980 if let Some ( backends) = target_codegen_backends {
981981 target. codegen_backends =
982982 Some ( parse_codegen_backends ( backends, & format ! ( "target.{triple}" ) ) )
@@ -1371,7 +1371,6 @@ impl Config {
13711371 initial_rustdoc,
13721372 initial_rustfmt,
13731373 initial_sysroot,
1374- jemalloc : rust_jemalloc. unwrap_or ( false ) ,
13751374 jobs : Some ( threads_from_config ( flags_jobs. or ( build_jobs) . unwrap_or ( 0 ) ) ) ,
13761375 json_output : flags_json_output,
13771376 keep_stage : flags_keep_stage,
@@ -1433,6 +1432,7 @@ impl Config {
14331432 on_fail : flags_on_fail,
14341433 optimized_compiler_builtins,
14351434 out,
1435+ override_allocator : rust_override_allocator. unwrap_or ( false ) ,
14361436 patch_binaries_for_nix : build_patch_binaries_for_nix,
14371437 path_modification_cache,
14381438 paths : flags_paths,
@@ -1864,8 +1864,11 @@ impl Config {
18641864 self . enabled_codegen_backends ( target) . first ( ) . unwrap ( )
18651865 }
18661866
1867- pub fn jemalloc ( & self , target : TargetSelection ) -> bool {
1868- self . target_config . get ( & target) . and_then ( |cfg| cfg. jemalloc ) . unwrap_or ( self . jemalloc )
1867+ pub fn override_allocator ( & self , target : TargetSelection ) -> bool {
1868+ self . target_config
1869+ . get ( & target)
1870+ . and_then ( |cfg| cfg. override_allocator )
1871+ . unwrap_or ( self . override_allocator )
18691872 }
18701873
18711874 pub fn rpath_enabled ( & self , target : TargetSelection ) -> bool {
0 commit comments