diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-06-18 17:55:24 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-06-19 12:56:31 +0000 |
| commit | 7ff0df51024a96e91f41c3760b5676ebbdc7a2c0 (patch) | |
| tree | 8edbf86c1312908227b499fb3e53a6edbfc9fcfc /compiler/rustc_codegen_cranelift/src | |
| parent | 43929a8a75d85ae3939a80703bdd827e81c51ba5 (diff) | |
| download | rust-7ff0df51024a96e91f41c3760b5676ebbdc7a2c0.tar.gz rust-7ff0df51024a96e91f41c3760b5676ebbdc7a2c0.zip | |
Fix "Remove src_files and remove_file"
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/archive.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/archive.rs b/compiler/rustc_codegen_cranelift/src/archive.rs index 4822c7e03a9..e9b074e1837 100644 --- a/compiler/rustc_codegen_cranelift/src/archive.rs +++ b/compiler/rustc_codegen_cranelift/src/archive.rs @@ -92,7 +92,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> { Ok(()) } - fn build(mut self) { + fn build(mut self) -> bool { enum BuilderKind { Bsd(ar::Builder<File>), Gnu(ar::GnuBuilder<File>), @@ -191,6 +191,8 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> { ) }; + let any_members = !entries.is_empty(); + // Add all files for (entry_name, data) in entries.into_iter() { let header = ar::Header::new(entry_name, data.len() as u64); @@ -216,6 +218,8 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> { self.sess.fatal(&format!("Ranlib exited with code {:?}", status.code())); } } + + any_members } fn inject_dll_import_lib( |
