mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
rustc_codegen_ssa: write .dwp
in a streaming fashion
This commit is contained in:
parent
70f8737b2f
commit
433d471a1a
@ -676,8 +676,7 @@ fn link_dwarf_object<'a>(
|
||||
thorin::MissingReferencedObjectBehaviour::Skip,
|
||||
)?;
|
||||
|
||||
let output = package.finish()?.write()?;
|
||||
let mut output_stream = BufWriter::new(
|
||||
let output_stream = BufWriter::new(
|
||||
OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
@ -685,8 +684,10 @@ fn link_dwarf_object<'a>(
|
||||
.truncate(true)
|
||||
.open(dwp_out_filename)?,
|
||||
);
|
||||
output_stream.write_all(&output)?;
|
||||
output_stream.flush()?;
|
||||
let mut output_stream = object::write::StreamingBuffer::new(output_stream);
|
||||
package.finish()?.emit(&mut output_stream)?;
|
||||
output_stream.result()?;
|
||||
output_stream.into_inner().flush()?;
|
||||
|
||||
Ok(())
|
||||
}) {
|
||||
|
Loading…
Reference in New Issue
Block a user