about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-11 15:16:09 +0000
committerbors <bors@rust-lang.org>2022-02-11 15:16:09 +0000
commit78450d2d602b06d9b94349aaf8cece1a4acaf3a8 (patch)
tree5bc15e671d115341faaa337fd223353696755ab1 /compiler/rustc_codegen_ssa/src
parente273fca380c5d28bc32b25ac1a885c61d4c5e75e (diff)
parentc543f7dbd4cc4afb57cb00b2937b50a3371fa15d (diff)
downloadrust-78450d2d602b06d9b94349aaf8cece1a4acaf3a8.tar.gz
rust-78450d2d602b06d9b94349aaf8cece1a4acaf3a8.zip
Auto merge of #93891 - matthiaskrgr:rollup-xadut8w, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #92242 (Erase regions before calculating layout for packed field capture)
 - #93443 (Add comment on stable_hash_impl for OwnerNodes)
 - #93742 (Drop rustc-docs from complete profile)
 - #93852 (rustdoc: remove support for multi-query search)
 - #93853 (Make all `hir::Map` methods consistently by-value)
 - #93861 (Fix ICE if no trait assoc const eq)
 - #93862 (Split x86_64-apple builder into two)
 - #93864 (Remove ArchiveBuilder::update_symbols)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/archive.rs1
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs14
2 files changed, 1 insertions, 14 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 7a13e424f9a..e53c9842117 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -333,10 +333,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
         ab.inject_dll_import_lib(&raw_dylib_name, &raw_dylib_imports, tmpdir);
     }
 
-    // After adding all files to the archive, we need to update the
-    // symbol table of the archive.
-    ab.update_symbols();
-
     // Note that it is important that we add all of our non-object "magical
     // files" *after* all of the object files in the archive. The reason for
     // this is as follows:
@@ -365,13 +361,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
             // normal linkers for the platform.
             let metadata = create_rmeta_file(sess, codegen_results.metadata.raw_data());
             ab.add_file(&emit_metadata(sess, &metadata, tmpdir));
-
-            // After adding all files to the archive, we need to update the
-            // symbol table of the archive. This currently dies on macOS (see
-            // #11162), and isn't necessary there anyway
-            if !sess.target.is_like_osx {
-                ab.update_symbols();
-            }
         }
 
         RlibFlavor::StaticlibBase => {
@@ -381,6 +370,7 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
             }
         }
     }
+
     return Ok(ab);
 }
 
@@ -509,7 +499,6 @@ fn link_staticlib<'a, B: ArchiveBuilder<'a>>(
         sess.fatal(&e);
     }
 
-    ab.update_symbols();
     ab.build();
 
     if !all_native_libs.is_empty() {
@@ -2310,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() {