File tree Expand file tree Collapse file tree 2 files changed +2
-15
lines changed Expand file tree Collapse file tree 2 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -671,18 +671,7 @@ pub(crate) fn run_aot(tcx: TyCtxt<'_>) -> Box<OngoingCodegen> {
671671 }
672672 . to_owned ( ) ;
673673
674- let cgus = if tcx. sess . opts . output_types . should_codegen ( ) {
675- tcx. collect_and_partition_mono_items ( ( ) ) . codegen_units
676- } else {
677- // If only `--emit metadata` is used, we shouldn't perform any codegen.
678- // Also `tcx.collect_and_partition_mono_items` may panic in that case.
679- return Box :: new ( OngoingCodegen {
680- modules : vec ! [ ] ,
681- allocator_module : None ,
682- crate_info : CrateInfo :: new ( tcx, target_cpu) ,
683- concurrency_limiter : ConcurrencyLimiter :: new ( 0 ) ,
684- } ) ;
685- } ;
674+ let cgus = tcx. collect_and_partition_mono_items ( ( ) ) . codegen_units ;
686675
687676 if tcx. dep_graph . is_fully_enabled ( ) {
688677 for cgu in cgus {
Original file line number Diff line number Diff line change @@ -33,9 +33,7 @@ fn create_jit_module(tcx: TyCtxt<'_>) -> (UnwindModule<JITModule>, CodegenCx) {
3333}
3434
3535pub ( crate ) fn run_jit ( tcx : TyCtxt < ' _ > , jit_args : Vec < String > ) -> ! {
36- if !tcx. sess . opts . output_types . should_codegen ( ) {
37- tcx. dcx ( ) . fatal ( "JIT mode doesn't work with `cargo check`" ) ;
38- }
36+ // FIXME error on check mode or crate types other than bin in CodegenBackend::init()
3937
4038 if !tcx. crate_types ( ) . contains ( & rustc_session:: config:: CrateType :: Executable ) {
4139 tcx. dcx ( ) . fatal ( "can't jit non-executable crate" ) ;
You can’t perform that action at this time.
0 commit comments