about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2022-02-10 18:27:18 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2022-02-10 18:27:18 +0100
commit609784711a0a3cb399299d65b58463253541b2da (patch)
tree4093e73a48960507569b54fa381b3f18180e8fbf /compiler/rustc_codegen_ssa/src/back
parent203b622a6590d6469e37ce827a62d5931cc837f2 (diff)
downloadrust-609784711a0a3cb399299d65b58463253541b2da.tar.gz
rust-609784711a0a3cb399299d65b58463253541b2da.zip
Unconditionally update symbols
All paths to an ArchiveBuilder::build call update_symbols first.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/archive.rs1
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs6
2 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/archive.rs b/compiler/rustc_codegen_ssa/src/back/archive.rs
index 3db948a16fc..a2f74b94214 100644
--- a/compiler/rustc_codegen_ssa/src/back/archive.rs
+++ b/compiler/rustc_codegen_ssa/src/back/archive.rs
@@ -51,7 +51,6 @@ pub trait ArchiveBuilder<'a> {
     fn add_archive<F>(&mut self, archive: &Path, skip: F) -> io::Result<()>
     where
         F: FnMut(&str) -> bool + 'static;
-    fn update_symbols(&mut self);
 
     fn build(self);
 
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 3ac98e392ae..e53c9842117 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -371,10 +371,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
         }
     }
 
-    // After adding all files to the archive, we need to update the
-    // symbol table of the archive.
-    ab.update_symbols();
-
     return Ok(ab);
 }
 
@@ -503,7 +499,6 @@ fn link_staticlib<'a, B: ArchiveBuilder<'a>>(
         sess.fatal(&e);
     }
 
-    ab.update_symbols();
     ab.build();
 
     if !all_native_libs.is_empty() {
@@ -2304,7 +2299,6 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
 
         sess.prof.generic_activity_with_arg("link_altering_rlib", name).run(|| {
             let mut archive = <B as ArchiveBuilder>::new(sess, &dst, Some(cratepath));
-            archive.update_symbols();
 
             let mut any_objects = false;
             for f in archive.src_files() {