Fix "Remove src_files and remove_file"
This commit is contained in:
parent
489d2daec0
commit
2c7038b860
@ -100,7 +100,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build(mut self) {
|
fn build(mut self) -> bool {
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
fn add_file_using_ar(archive: &Path, file: &Path) {
|
fn add_file_using_ar(archive: &Path, file: &Path) {
|
||||||
@ -133,6 +133,8 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
|
|||||||
BuilderKind::Bsd(ar::Builder::new(File::create(&self.config.dst).unwrap()))
|
BuilderKind::Bsd(ar::Builder::new(File::create(&self.config.dst).unwrap()))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let any_members = !self.entries.is_empty();
|
||||||
|
|
||||||
// Add all files
|
// Add all files
|
||||||
for (entry_name, entry) in self.entries.into_iter() {
|
for (entry_name, entry) in self.entries.into_iter() {
|
||||||
match entry {
|
match entry {
|
||||||
@ -193,6 +195,8 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
|
|||||||
if !status.success() {
|
if !status.success() {
|
||||||
self.config.sess.fatal(&format!("Ranlib exited with code {:?}", status.code()));
|
self.config.sess.fatal(&format!("Ranlib exited with code {:?}", status.code()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
any_members
|
||||||
}
|
}
|
||||||
|
|
||||||
fn inject_dll_import_lib(&mut self, _lib_name: &str, _dll_imports: &[DllImport], _tmpdir: &MaybeTempDir) {
|
fn inject_dll_import_lib(&mut self, _lib_name: &str, _dll_imports: &[DllImport], _tmpdir: &MaybeTempDir) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user