@@ -15,8 +15,8 @@ use crate::errors::{
15
15
use crate :: llvm:: archive_ro:: { ArchiveRO , Child } ;
16
16
use crate :: llvm:: { self , ArchiveKind , LLVMMachineType , LLVMRustCOFFShortExport } ;
17
17
use rustc_codegen_ssa:: back:: archive:: {
18
- get_native_object_symbols, try_extract_macho_fat_archive , ArArchiveBuilder ,
19
- ArchiveBuildFailure , ArchiveBuilder , ArchiveBuilderBuilder , UnknownArchiveKind ,
18
+ get_native_object_symbols, ArArchiveBuilder , ArchiveBuildFailure , ArchiveBuilder ,
19
+ ArchiveBuilderBuilder , UnknownArchiveKind ,
20
20
} ;
21
21
22
22
use rustc_session:: cstore:: DllImport ;
@@ -66,21 +66,15 @@ impl<'a> ArchiveBuilder<'a> for LlvmArchiveBuilder<'a> {
66
66
archive : & Path ,
67
67
skip : Box < dyn FnMut ( & str ) -> bool + ' static > ,
68
68
) -> io:: Result < ( ) > {
69
- let mut archive = archive. to_path_buf ( ) ;
70
- if self . sess . target . llvm_target . contains ( "-apple-macosx" ) {
71
- if let Some ( new_archive) = try_extract_macho_fat_archive ( & self . sess , & archive) ? {
72
- archive = new_archive
73
- }
74
- }
75
- let archive_ro = match ArchiveRO :: open ( & archive) {
69
+ let archive_ro = match ArchiveRO :: open ( archive) {
76
70
Ok ( ar) => ar,
77
71
Err ( e) => return Err ( io:: Error :: new ( io:: ErrorKind :: Other , e) ) ,
78
72
} ;
79
73
if self . additions . iter ( ) . any ( |ar| ar. path ( ) == archive) {
80
74
return Ok ( ( ) ) ;
81
75
}
82
76
self . additions . push ( Addition :: Archive {
83
- path : archive,
77
+ path : archive. to_path_buf ( ) ,
84
78
archive : archive_ro,
85
79
skip : Box :: new ( skip) ,
86
80
} ) ;
0 commit comments