File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
compiler/rustc_codegen_ssa/src/back Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -676,17 +676,18 @@ fn link_dwarf_object<'a>(
676
676
thorin:: MissingReferencedObjectBehaviour :: Skip ,
677
677
) ?;
678
678
679
- let output = package. finish ( ) ?. write ( ) ?;
680
- let mut output_stream = BufWriter :: new (
679
+ let output_stream = BufWriter :: new (
681
680
OpenOptions :: new ( )
682
681
. read ( true )
683
682
. write ( true )
684
683
. create ( true )
685
684
. truncate ( true )
686
685
. open ( dwp_out_filename) ?,
687
686
) ;
688
- output_stream. write_all ( & output) ?;
689
- output_stream. flush ( ) ?;
687
+ let mut output_stream = object:: write:: StreamingBuffer :: new ( output_stream) ;
688
+ package. finish ( ) ?. emit ( & mut output_stream) ?;
689
+ output_stream. result ( ) ?;
690
+ output_stream. into_inner ( ) . flush ( ) ?;
690
691
691
692
Ok ( ( ) )
692
693
} ) {
You can’t perform that action at this time.
0 commit comments