Only run ranlib when necessary
This commit is contained in:
parent
daad966be7
commit
282e3055e1
1 changed files with 9 additions and 7 deletions
|
@ -220,14 +220,16 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
|
||||||
// Finalize archive
|
// Finalize archive
|
||||||
std::mem::drop(builder);
|
std::mem::drop(builder);
|
||||||
|
|
||||||
// Run ranlib to be able to link the archive
|
if self.update_symbols {
|
||||||
let status = std::process::Command::new("ranlib")
|
// Run ranlib to be able to link the archive
|
||||||
.arg(self.config.dst)
|
let status = std::process::Command::new("ranlib")
|
||||||
.status()
|
.arg(self.config.dst)
|
||||||
.expect("Couldn't run ranlib");
|
.status()
|
||||||
|
.expect("Couldn't run ranlib");
|
||||||
|
|
||||||
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()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue