Remove the source archive functionality of ArchiveWriter
We now build archives through strictly additive means rather than taking an existing archive and potentially substracting parts.
This commit is contained in:
parent
7ff0df5102
commit
18c6fe5798
5 changed files with 11 additions and 82 deletions
|
@ -42,7 +42,7 @@ pub(super) fn find_library(
|
|||
}
|
||||
|
||||
pub trait ArchiveBuilder<'a> {
|
||||
fn new(sess: &'a Session, output: &Path, input: Option<&Path>) -> Self;
|
||||
fn new(sess: &'a Session, output: &Path) -> Self;
|
||||
|
||||
fn add_file(&mut self, path: &Path);
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
|
|||
|
||||
let lib_search_paths = archive_search_paths(sess);
|
||||
|
||||
let mut ab = <B as ArchiveBuilder>::new(sess, out_filename, None);
|
||||
let mut ab = <B as ArchiveBuilder>::new(sess, out_filename);
|
||||
|
||||
let trailing_metadata = match flavor {
|
||||
RlibFlavor::Normal => {
|
||||
|
@ -2472,7 +2472,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
|
|||
let is_builtins = sess.target.no_builtins
|
||||
|| !codegen_results.crate_info.is_no_builtins.contains(&cnum);
|
||||
|
||||
let mut archive = <B as ArchiveBuilder>::new(sess, &dst, None);
|
||||
let mut archive = <B as ArchiveBuilder>::new(sess, &dst);
|
||||
if let Err(e) = archive.add_archive(cratepath, move |f| {
|
||||
if f == METADATA_FILENAME {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue