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:18:38 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2022-02-10 18:18:38 +0100
commit203b622a6590d6469e37ce827a62d5931cc837f2 (patch)
tree3f77997c1ad1bcbd00ad3c188ef945e911397b28 /compiler/rustc_codegen_ssa/src/back
parent502d6aa47b4118fea1e326529e71b25a99b0d6c5 (diff)
downloadrust-203b622a6590d6469e37ce827a62d5931cc837f2.tar.gz
rust-203b622a6590d6469e37ce827a62d5931cc837f2.zip
Remove unnecessary update_symbols call
For cg_llvm update_symbols merely sets a flag, so changing the position
or removing an additional call doesn't have any effect.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 7a13e424f9a..3ac98e392ae 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,11 @@ 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);
 }