@@ -320,7 +320,6 @@ pub type ExportedSymbols = FxHashMap<CrateNum, Arc<Vec<(String, SymbolExportInfo
320320#[ derive( Clone ) ]
321321pub struct CodegenContext < B : WriteBackendMethods > {
322322 // Resources needed when running LTO
323- pub backend : B ,
324323 pub prof : SelfProfilerRef ,
325324 pub lto : Lto ,
326325 pub save_temps : bool ,
@@ -338,14 +337,10 @@ pub struct CodegenContext<B: WriteBackendMethods> {
338337 pub msvc_imps_needed : bool ,
339338 pub is_pe_coff : bool ,
340339 pub target_can_use_split_dwarf : bool ,
341- pub target_pointer_width : u32 ,
342340 pub target_arch : String ,
343- pub debuginfo : config:: DebugInfo ,
344341 pub split_debuginfo : rustc_target:: spec:: SplitDebuginfo ,
345342 pub split_dwarf_kind : rustc_session:: config:: SplitDwarfKind ,
346343
347- /// Number of cgus excluding the allocator/metadata modules
348- pub total_cgus : usize ,
349344 /// Handler to use for diagnostics produced during codegen.
350345 pub diag_emitter : SharedEmitter ,
351346 /// LLVM optimizations for which we want to print remarks.
@@ -441,7 +436,6 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
441436 target_cpu : String ,
442437 metadata : EncodedMetadata ,
443438 metadata_module : Option < CompiledModule > ,
444- total_cgus : usize ,
445439) -> OngoingCodegen < B > {
446440 let ( coordinator_send, coordinator_receive) = channel ( ) ;
447441 let sess = tcx. sess ;
@@ -469,7 +463,6 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
469463 shared_emitter,
470464 codegen_worker_send,
471465 coordinator_receive,
472- total_cgus,
473466 sess. jobserver . clone ( ) ,
474467 Arc :: new ( regular_config) ,
475468 Arc :: new ( metadata_config) ,
@@ -982,7 +975,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
982975 shared_emitter : SharedEmitter ,
983976 codegen_worker_send : Sender < CguMessage > ,
984977 coordinator_receive : Receiver < Box < dyn Any + Send > > ,
985- total_cgus : usize ,
986978 jobserver : Client ,
987979 regular_config : Arc < ModuleConfig > ,
988980 metadata_config : Arc < ModuleConfig > ,
@@ -1050,7 +1042,6 @@ fn start_executing_work<B: ExtraBackendMethods>(
10501042 } ;
10511043 let backend_features = tcx. global_backend_features ( ( ) ) ;
10521044 let cgcx = CodegenContext :: < B > {
1053- backend : backend. clone ( ) ,
10541045 crate_types : sess. crate_types ( ) . to_vec ( ) ,
10551046 each_linked_rlib_for_lto,
10561047 lto : sess. lto ( ) ,
@@ -1071,13 +1062,10 @@ fn start_executing_work<B: ExtraBackendMethods>(
10711062 metadata_module_config : metadata_config,
10721063 allocator_module_config : allocator_config,
10731064 tm_factory : backend. target_machine_factory ( tcx. sess , ol, backend_features) ,
1074- total_cgus,
10751065 msvc_imps_needed : msvc_imps_needed ( tcx) ,
10761066 is_pe_coff : tcx. sess . target . is_like_windows ,
10771067 target_can_use_split_dwarf : tcx. sess . target_can_use_split_dwarf ( ) ,
1078- target_pointer_width : tcx. sess . target . pointer_width ,
10791068 target_arch : tcx. sess . target . arch . to_string ( ) ,
1080- debuginfo : tcx. sess . opts . debuginfo ,
10811069 split_debuginfo : tcx. sess . split_debuginfo ( ) ,
10821070 split_dwarf_kind : tcx. sess . opts . unstable_opts . split_dwarf_kind ,
10831071 } ;
0 commit comments