From b2e298853113e9b9d68c956749d92ad540fb286d Mon Sep 17 00:00:00 2001
From: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Date: Fri, 27 Jan 2023 11:46:20 +0000
Subject: [PATCH] Revert "Avoid a temporary file when processing macOS fat
archives"
This reverts commit bd8e476d8bd85b6d60a0de7694d154b4a74f5133.
---
.../rustc_codegen_ssa/src/back/archive.rs | 70 ++++++++++---------
1 file changed, 36 insertions(+), 34 deletions(-)
diff --git a/compiler/rustc_codegen_ssa/src/back/archive.rs b/compiler/rustc_codegen_ssa/src/back/archive.rs
index 6eb120157da..d3cd085cfb6 100644
--- a/compiler/rustc_codegen_ssa/src/back/archive.rs
+++ b/compiler/rustc_codegen_ssa/src/back/archive.rs
@@ -14,7 +14,7 @@
use std::error::Error;
use std::fs::File;
-use std::io;
+use std::io::{self, Write};
use std::path::{Path, PathBuf};
// Re-exporting for rustc_codegen_llvm::back::archive
@@ -116,11 +116,12 @@ pub fn new(
}
}
-fn try_filter_fat_archs<'a>(
+fn try_filter_fat_archs(
archs: object::read::Result<&[impl FatArch]>,
target_arch: object::Architecture,
- archive_map_data: &'a [u8],
-) -> io::Result