@@ -333,10 +333,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
333333 ab. inject_dll_import_lib ( & raw_dylib_name, & raw_dylib_imports, tmpdir) ;
334334 }
335335
336- // After adding all files to the archive, we need to update the
337- // symbol table of the archive.
338- ab. update_symbols ( ) ;
339-
340336 // Note that it is important that we add all of our non-object "magical
341337 // files" *after* all of the object files in the archive. The reason for
342338 // this is as follows:
@@ -365,13 +361,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
365361 // normal linkers for the platform.
366362 let metadata = create_rmeta_file ( sess, codegen_results. metadata . raw_data ( ) ) ;
367363 ab. add_file ( & emit_metadata ( sess, & metadata, tmpdir) ) ;
368-
369- // After adding all files to the archive, we need to update the
370- // symbol table of the archive. This currently dies on macOS (see
371- // #11162), and isn't necessary there anyway
372- if !sess. target . is_like_osx {
373- ab. update_symbols ( ) ;
374- }
375364 }
376365
377366 RlibFlavor :: StaticlibBase => {
@@ -381,6 +370,7 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
381370 }
382371 }
383372 }
373+
384374 return Ok ( ab) ;
385375}
386376
@@ -509,7 +499,6 @@ fn link_staticlib<'a, B: ArchiveBuilder<'a>>(
509499 sess. fatal ( & e) ;
510500 }
511501
512- ab. update_symbols ( ) ;
513502 ab. build ( ) ;
514503
515504 if !all_native_libs. is_empty ( ) {
@@ -2310,7 +2299,6 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
23102299
23112300 sess. prof . generic_activity_with_arg ( "link_altering_rlib" , name) . run ( || {
23122301 let mut archive = <B as ArchiveBuilder >:: new ( sess, & dst, Some ( cratepath) ) ;
2313- archive. update_symbols ( ) ;
23142302
23152303 let mut any_objects = false ;
23162304 for f in archive. src_files ( ) {
0 commit comments