@@ -10,9 +10,9 @@ use std::thread::JoinHandle;
1010
1111use cranelift_object:: { ObjectBuilder , ObjectModule } ;
1212use rustc_codegen_ssa:: assert_module_sources:: CguReuse ;
13- use rustc_codegen_ssa:: back:: write:: { CompiledModules , produce_final_output_artifacts} ;
13+ use rustc_codegen_ssa:: back:: write:: produce_final_output_artifacts;
1414use rustc_codegen_ssa:: base:: determine_cgu_reuse;
15- use rustc_codegen_ssa:: { CodegenResults , CompiledModule , CrateInfo , ModuleKind } ;
15+ use rustc_codegen_ssa:: { CompiledModule , CompiledModules , ModuleKind } ;
1616use rustc_data_structures:: profiling:: SelfProfilerRef ;
1717use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
1818use rustc_data_structures:: sync:: { IntoDynSyncSend , par_map} ;
@@ -54,7 +54,6 @@ impl<HCX> HashStable<HCX> for OngoingModuleCodegen {
5454pub ( crate ) struct OngoingCodegen {
5555 modules : Vec < OngoingModuleCodegen > ,
5656 allocator_module : Option < CompiledModule > ,
57- crate_info : CrateInfo ,
5857 concurrency_limiter : ConcurrencyLimiter ,
5958}
6059
@@ -63,7 +62,7 @@ impl OngoingCodegen {
6362 self ,
6463 sess : & Session ,
6564 outputs : & OutputFilenames ,
66- ) -> ( CodegenResults , FxIndexMap < WorkProductId , WorkProduct > ) {
65+ ) -> ( CompiledModules , FxIndexMap < WorkProductId , WorkProduct > ) {
6766 let mut work_products = FxIndexMap :: default ( ) ;
6867 let mut modules = vec ! [ ] ;
6968 let disable_incr_cache = disable_incr_cache ( ) ;
@@ -126,15 +125,7 @@ impl OngoingCodegen {
126125
127126 produce_final_output_artifacts ( sess, & compiled_modules, outputs) ;
128127
129- (
130- CodegenResults {
131- crate_info : self . crate_info ,
132-
133- modules : compiled_modules. modules ,
134- allocator_module : compiled_modules. allocator_module ,
135- } ,
136- work_products,
137- )
128+ ( compiled_modules, work_products)
138129 }
139130}
140131
@@ -483,13 +474,6 @@ fn emit_allocator_module(tcx: TyCtxt<'_>) -> Option<CompiledModule> {
483474}
484475
485476pub ( crate ) fn run_aot ( tcx : TyCtxt < ' _ > ) -> Box < OngoingCodegen > {
486- // FIXME handle `-Ctarget-cpu=native`
487- let target_cpu = match tcx. sess . opts . cg . target_cpu {
488- Some ( ref name) => name,
489- None => tcx. sess . target . cpu . as_ref ( ) ,
490- }
491- . to_owned ( ) ;
492-
493477 let cgus = tcx. collect_and_partition_mono_items ( ( ) ) . codegen_units ;
494478
495479 if tcx. dep_graph . is_fully_enabled ( ) {
@@ -549,7 +533,6 @@ pub(crate) fn run_aot(tcx: TyCtxt<'_>) -> Box<OngoingCodegen> {
549533 Box :: new ( OngoingCodegen {
550534 modules,
551535 allocator_module,
552- crate_info : CrateInfo :: new ( tcx, target_cpu) ,
553536 concurrency_limiter : concurrency_limiter. 0 ,
554537 } )
555538}
0 commit comments