X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_codegen_cranelift%2Fsrc%2Farchive.rs;h=31d3d0e06156bf3defc921299d5c61c3604c29ed;hb=e54a13f18bf2873f12d556fb05bb60f2a7f75bfa;hp=b4c790961707900f839ad4977a89d5e725cf9f69;hpb=561ea0a746fae943eb6c895a71fb8cbfce22e03a;p=rust.git diff --git a/compiler/rustc_codegen_cranelift/src/archive.rs b/compiler/rustc_codegen_cranelift/src/archive.rs index b4c79096170..31d3d0e0615 100644 --- a/compiler/rustc_codegen_cranelift/src/archive.rs +++ b/compiler/rustc_codegen_cranelift/src/archive.rs @@ -159,6 +159,8 @@ enum BuilderKind { let err = err.to_string(); if err == "Unknown file magic" { // Not an object file; skip it. + } else if object::read::archive::ArchiveFile::parse(&*data).is_ok() { + // Nested archive file; skip it. } else { sess.fatal(&format!( "error parsing `{}` during archive creation: {}",