File tree 1 file changed +11
-9
lines changed
src/librustc_codegen_llvm/back
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -773,17 +773,19 @@ pub(crate) unsafe fn codegen(
773
773
}
774
774
}
775
775
776
- if config. emit_obj && config. obj_is_bitcode {
777
- debug ! ( "copying bitcode {:?} to obj {:?}" , bc_out, obj_out) ;
778
- if let Err ( e) = link_or_copy ( & bc_out, & obj_out) {
779
- diag_handler. err ( & format ! ( "failed to copy bitcode to object file: {}" , e) ) ;
776
+ if config. obj_is_bitcode {
777
+ if config. emit_obj {
778
+ debug ! ( "copying bitcode {:?} to obj {:?}" , bc_out, obj_out) ;
779
+ if let Err ( e) = link_or_copy ( & bc_out, & obj_out) {
780
+ diag_handler. err ( & format ! ( "failed to copy bitcode to object file: {}" , e) ) ;
781
+ }
780
782
}
781
- }
782
783
783
- if !config. emit_bc && config. obj_is_bitcode {
784
- debug ! ( "removing_bitcode {:?}" , bc_out) ;
785
- if let Err ( e) = fs:: remove_file ( & bc_out) {
786
- diag_handler. err ( & format ! ( "failed to remove bitcode: {}" , e) ) ;
784
+ if !config. emit_bc {
785
+ debug ! ( "removing_bitcode {:?}" , bc_out) ;
786
+ if let Err ( e) = fs:: remove_file ( & bc_out) {
787
+ diag_handler. err ( & format ! ( "failed to remove bitcode: {}" , e) ) ;
788
+ }
787
789
}
788
790
}
789
791
You can’t perform that action at this time.
0 commit comments