@@ -320,7 +320,6 @@ pub type ExportedSymbols = FxHashMap<CrateNum, Arc<Vec<(String, SymbolExportInfo
320
320
#[ derive( Clone ) ]
321
321
pub struct CodegenContext < B : WriteBackendMethods > {
322
322
// Resources needed when running LTO
323
- pub backend : B ,
324
323
pub prof : SelfProfilerRef ,
325
324
pub lto : Lto ,
326
325
pub save_temps : bool ,
@@ -338,14 +337,10 @@ pub struct CodegenContext<B: WriteBackendMethods> {
338
337
pub msvc_imps_needed : bool ,
339
338
pub is_pe_coff : bool ,
340
339
pub target_can_use_split_dwarf : bool ,
341
- pub target_pointer_width : u32 ,
342
340
pub target_arch : String ,
343
- pub debuginfo : config:: DebugInfo ,
344
341
pub split_debuginfo : rustc_target:: spec:: SplitDebuginfo ,
345
342
pub split_dwarf_kind : rustc_session:: config:: SplitDwarfKind ,
346
343
347
- /// Number of cgus excluding the allocator/metadata modules
348
- pub total_cgus : usize ,
349
344
/// Handler to use for diagnostics produced during codegen.
350
345
pub diag_emitter : SharedEmitter ,
351
346
/// LLVM optimizations for which we want to print remarks.
@@ -441,7 +436,6 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
441
436
target_cpu : String ,
442
437
metadata : EncodedMetadata ,
443
438
metadata_module : Option < CompiledModule > ,
444
- total_cgus : usize ,
445
439
) -> OngoingCodegen < B > {
446
440
let ( coordinator_send, coordinator_receive) = channel ( ) ;
447
441
let sess = tcx. sess ;
@@ -469,7 +463,6 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
469
463
shared_emitter,
470
464
codegen_worker_send,
471
465
coordinator_receive,
472
- total_cgus,
473
466
sess. jobserver . clone ( ) ,
474
467
Arc :: new ( regular_config) ,
475
468
Arc :: new ( metadata_config) ,
@@ -982,7 +975,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
982
975
shared_emitter : SharedEmitter ,
983
976
codegen_worker_send : Sender < CguMessage > ,
984
977
coordinator_receive : Receiver < Box < dyn Any + Send > > ,
985
- total_cgus : usize ,
986
978
jobserver : Client ,
987
979
regular_config : Arc < ModuleConfig > ,
988
980
metadata_config : Arc < ModuleConfig > ,
@@ -1050,7 +1042,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
1050
1042
} ;
1051
1043
let backend_features = tcx. global_backend_features ( ( ) ) ;
1052
1044
let cgcx = CodegenContext :: < B > {
1053
- backend : backend. clone ( ) ,
1054
1045
crate_types : sess. crate_types ( ) . to_vec ( ) ,
1055
1046
each_linked_rlib_for_lto,
1056
1047
lto : sess. lto ( ) ,
@@ -1071,13 +1062,10 @@ fn start_executing_work<B: ExtraBackendMethods>(
1071
1062
metadata_module_config : metadata_config,
1072
1063
allocator_module_config : allocator_config,
1073
1064
tm_factory : backend. target_machine_factory ( tcx. sess , ol, backend_features) ,
1074
- total_cgus,
1075
1065
msvc_imps_needed : msvc_imps_needed ( tcx) ,
1076
1066
is_pe_coff : tcx. sess . target . is_like_windows ,
1077
1067
target_can_use_split_dwarf : tcx. sess . target_can_use_split_dwarf ( ) ,
1078
- target_pointer_width : tcx. sess . target . pointer_width ,
1079
1068
target_arch : tcx. sess . target . arch . to_string ( ) ,
1080
- debuginfo : tcx. sess . opts . debuginfo ,
1081
1069
split_debuginfo : tcx. sess . split_debuginfo ( ) ,
1082
1070
split_dwarf_kind : tcx. sess . opts . unstable_opts . split_dwarf_kind ,
1083
1071
} ;
0 commit comments