File tree 1 file changed +6
-3
lines changed
compiler/rustc_interface/src
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -996,9 +996,12 @@ pub fn start_codegen<'tcx>(
996
996
codegen_backend. codegen_crate ( tcx, metadata, need_metadata_module)
997
997
} ) ;
998
998
999
- rustc_incremental:: assert_module_sources:: assert_module_sources ( tcx) ;
1000
-
1001
- rustc_symbol_mangling:: test:: report_symbol_names ( tcx) ;
999
+ // Don't run these test assertions when not doing codegen. Compiletest tries to build
1000
+ // build-fail tests in check mode first and expects it to not give an error in that case.
1001
+ if tcx. sess . opts . output_types . should_codegen ( ) {
1002
+ rustc_incremental:: assert_module_sources:: assert_module_sources ( tcx) ;
1003
+ rustc_symbol_mangling:: test:: report_symbol_names ( tcx) ;
1004
+ }
1002
1005
1003
1006
tcx. sess . time ( "assert_dep_graph" , || rustc_incremental:: assert_dep_graph ( tcx) ) ;
1004
1007
tcx. sess . time ( "serialize_dep_graph" , || rustc_incremental:: save_dep_graph ( tcx) ) ;
You can’t perform that action at this time.
0 commit comments