@@ -333,10 +333,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
333
333
ab. inject_dll_import_lib ( & raw_dylib_name, & raw_dylib_imports, tmpdir) ;
334
334
}
335
335
336
- // After adding all files to the archive, we need to update the
337
- // symbol table of the archive.
338
- ab. update_symbols ( ) ;
339
-
340
336
// Note that it is important that we add all of our non-object "magical
341
337
// files" *after* all of the object files in the archive. The reason for
342
338
// this is as follows:
@@ -365,13 +361,6 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
365
361
// normal linkers for the platform.
366
362
let metadata = create_rmeta_file ( sess, codegen_results. metadata . raw_data ( ) ) ;
367
363
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
- }
375
364
}
376
365
377
366
RlibFlavor :: StaticlibBase => {
@@ -381,6 +370,7 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
381
370
}
382
371
}
383
372
}
373
+
384
374
return Ok ( ab) ;
385
375
}
386
376
@@ -509,7 +499,6 @@ fn link_staticlib<'a, B: ArchiveBuilder<'a>>(
509
499
sess. fatal ( & e) ;
510
500
}
511
501
512
- ab. update_symbols ( ) ;
513
502
ab. build ( ) ;
514
503
515
504
if !all_native_libs. is_empty ( ) {
@@ -2310,7 +2299,6 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
2310
2299
2311
2300
sess. prof . generic_activity_with_arg ( "link_altering_rlib" , name) . run ( || {
2312
2301
let mut archive = <B as ArchiveBuilder >:: new ( sess, & dst, Some ( cratepath) ) ;
2313
- archive. update_symbols ( ) ;
2314
2302
2315
2303
let mut any_objects = false ;
2316
2304
for f in archive. src_files ( ) {
0 commit comments