about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-25 19:09:30 +0000
committerbors <bors@rust-lang.org>2022-11-25 19:09:30 +0000
commit8681d4cffcd23bbe619984ab62772a91827a40dc (patch)
tree32cc196f2843a02ea0ae3d08e50ccb1c96a6bedc /compiler/rustc_codegen_ssa/src
parent051cab2b842113b18da28259f4b85d0a7556f7f1 (diff)
parent12e1b84e95c05885d9f4714fe6dc2fceab0d2fe2 (diff)
downloadrust-8681d4cffcd23bbe619984ab62772a91827a40dc.tar.gz
rust-8681d4cffcd23bbe619984ab62772a91827a40dc.zip
Auto merge of #104902 - matthiaskrgr:rollup-oo27a4u, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #104716 (move 2 candidates into builtin candidate)
 - #104760 (Clarify `SyntaxExtensionKind::LegacyDerive`.)
 - #104797 (rustc_codegen_ssa: write `.dwp` in a streaming fashion)
 - #104835 (Use infcx.partially_normalize_associated_types_in)
 - #104853 (Fix typo in miri sysroot)
 - #104879 (jsondoclint: Recognise Typedef as valid kind for Type::ResolvedPath)
 - #104887 (rustbuild: Don't build doc::SharedAssets when building JSON docs.)
 - #104896 (rustdoc: fix broken tooltip CSS)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 2091730af22..762430c6187 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -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(())
     }) {