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>(
676676 thorin:: MissingReferencedObjectBehaviour :: Skip ,
677677 ) ?;
678678
679- let output = package. finish ( ) ?. write ( ) ?;
680- let mut output_stream = BufWriter :: new (
679+ let output_stream = BufWriter :: new (
681680 OpenOptions :: new ( )
682681 . read ( true )
683682 . write ( true )
684683 . create ( true )
685684 . truncate ( true )
686685 . open ( dwp_out_filename) ?,
687686 ) ;
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 ( ) ?;
690691
691692 Ok ( ( ) )
692693 } ) {
You can’t perform that action at this time.
0 commit comments